[PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
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? Scott F. -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Jay Blanchard
[snip] 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? [/snip] Does it need to be escaped? *shootin' from da'

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): 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

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
I thought about that also, so I took your suggestion and tried it. Still doens't work... I tried those... \]]; \]\]; Scott F. Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] strpos() is acting a little bit funny. When I do this... --snip-- $a =

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Um, it seem to work. That's weird. Should have check for the string length first, so I wasn't looking at the same problem. So, I did further debugging and I'm going to post the script here. Still don't know what is the problem here... --snip-- $XML_Start = (strpos($res_str,![CDATA[)+9);

RE: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Jay Blanchard
[snip] I thought about that also, so I took your suggestion and tried it. Still doens't work... I tried those... \]]; \]\]; [/snip] I tried Curt's solution...no problem. What are you expecting from strpos()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Sophie Mattoug
Just a stupid idea : are you sure you have '' in your text and not 'gt;' ? Scott Fletcher wrote: I thought about that also, so I took your suggestion and tried it. Still doens't work... I tried those... \]]; \]\]; Scott F. Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Yea, it's a and not a gt;.. It is pure XML tags Found the problem now, so no problem now. See other branch of this posting of a workaround to the problem I did... Thanks, Scott Sophie Mattoug [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just a stupid idea : are you sure

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Ah! Found the problem... It is probably a bug with strpos() because it seem to get stuck in there and couldn't get out of it somehow. The workaround the problem I did was just easily increment the $HTML_End by 1 and that fixed the problem. It look like this... --snip-- $XML_Start =

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
You can find more info about this on other branches, I found hte workaround to this problem. So, what am I expecting from strpos() is to find a starting point and ending point to the XML data and HTML data that are within the ![CDATA[]] tag...Like this

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Kelly Hallman
On Fri, 21 Nov 2003, Scott Fletcher wrote: Ah! Found the problem... It is probably a bug with strpos() because it seem to get stuck in there and couldn't get out of it somehow. The workaround the problem I did was just easily increment the $HTML_End by 1 and that fixed the problem. It look

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
With a moment of studying to your comment, I am beginning to see why I am having the problem. I add the 9 in the first two lines of code, so I didn't realize that I would have encounter the problem if I didn't add the 9. Well, I seem to have problem understanding the word, 'offset' to the

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Mark Charette
On Fri, 21 Nov 2003, Scott Fletcher wrote: Well, I seem to have problem understanding the word, 'offset' to the strpos() function because it is a bad choice of word strpos() and the word offset used with it is probably older than you ... :) -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Yea! :-) Don't we all hate it? :-) Mark Charette [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, 21 Nov 2003, Scott Fletcher wrote: Well, I seem to have problem understanding the word, 'offset' to the strpos() function because it is a bad choice of word strpos() and