Re: strpos() act funny when searching for "]]>"....
| From: | Curt Zirzow | Date: | Fri, 21 Nov 2003 16:03:03 +0000 |
| Subject: | Re: strpos() act funny when searching for "]]>".... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170578@lists.php.net to get a copy of this message | ||
* Thus wrote Scott Fletcher (scott@abcoa.com):
> strpos() is acting a little bit funny. When I do this...
>
> --snip--
> $a = strpos($data,"]]>");
> --snip--
>
> Problem is there are "]]>" characters in the $data string and it just
> doesn't see it. Anyone know why and what is the workaround to it?
It works perfectly fine:
$data = 'asdf ]]> asdf';
$a = strpos($data,"]]>");
print $a; //output: 5
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/