Never mind that! It work now.... Been working on it for a few hours though....
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Everyone! > > I'm not really sure why does this simple script not work. When I run > the code, the loop kept going until it timed out. I'll enclose the simple > code here... > > --snip-- > $res_str = "<Dog Name>Whoof</Dog Name><![CDATA[Whose Dog is that??]]>"; > > for ($i=0;$i<1000000;$i++) > { > if (substr($res_str, $i, 9) == "<![CDATA[") > { > echo "You got it!!!!"; > } > } > --snip-- > > This one should work but it doesn't, but I noticed that it does work if > I use this instead... > > --snip-- > if (substr($res_str, $i, 7) == "[CDATA[") > --snip-- > > So, the problem had to do with either the '<' character or the '!' > character that doesn't match. I thought maybe an escape character would > work, like '\' but it doesn't do anything. So, anyone know how to fix that > problem? > > Thanks, > Scott F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php