DaPaki1 Posted March 10, 2007 Share Posted March 10, 2007 Hi all, I got a problem and i'm stumped. I am using the strripos function to find the position of a string. For example, for finding this string: Type</td><td valign="top" align=left>" the following command worked great: strripos($mystring, "Type</td><td valign=\"top\" align=left"> All I had to do was add the backslashes (\) before the quatation marks ("). But with this string: Poster</td><td align="left" valign="top"><img src=" No matter what I try, it doesn't find it, although I'm sure its part of the string. This command craps out: strripos($mystring, "Poster</td><td align=\"left\"") But this command works: strripos($mystring, "Poster</td><td") I narrowed it down to the " a" in the word "align" giving me the problems. What am I doing wrong? Please help. I'm sure its pretty simple. (I'm a PHP newbie) Thanks Link to comment https://forums.phpfreaks.com/topic/42087-stripos-and-escape-characters/ Share on other sites More sharing options...
Orio Posted March 10, 2007 Share Posted March 10, 2007 In one part you used valign, and in the second align. I think this is your problem. Orio. Link to comment https://forums.phpfreaks.com/topic/42087-stripos-and-escape-characters/#findComment-204168 Share on other sites More sharing options...
DaPaki1 Posted March 10, 2007 Author Share Posted March 10, 2007 Thanks...I saw that a few minutes ago. I knew it'd be something stupid like that :-\ Link to comment https://forums.phpfreaks.com/topic/42087-stripos-and-escape-characters/#findComment-204180 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.