RE: [PHP] search question
| From: | Liam dot Gibbs at dfait-maeci dot gc dot ca | Date: | Wed, 27 Nov 2002 20:04:58 +0000 |
| Subject: | RE: [PHP] search question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-126347@lists.php.net to get a copy of this message | ||
<<I'm wondering what you all think the best way to "search" for a string is.
I guess its more of a matching (regex I'm thinking) but basically what I
want is this..>>
You could try any number of PHP functions, but the best ones would be
strchr/strstr/stristr (for locating the first occurrence of the string),
strpos (find the position of the first occurrence), or strrchr (to find the
last).