|
|
|
|
|
|
Function str_posEx | Language: PHP
|
Syntax
| str_posEx(Source, toFind, startAt) |
Parameters
| STRING | Source | Source string.
| | STRING | toFind | String to find.
| | INT | startAt | Optional. Where to start the search. Default is 0 (search in all the source string) |
Return value
| Position of the first character of the string found in the source, or false if not found. |
Description
Search a string in a string.
All characters between two comma or apostrophe are ignored, so the function can be used for example to find attributes names in an XML tag.
Search is case insensitive.
Use the === operator for testing the return value of this function. |
PHP Sample Code
$source = "this 'text' will not be found but this text will be found.";
echo(str_posEx($source, "text")); |
|
|
|