tekrscom Posted September 11, 2009 Share Posted September 11, 2009 Hi everybody... I can't seem to get strpos and strripos to work for me... Here's what I got so far... $StartingQuotePosition = strpos($row['ReplyContent'],"[Quote]",0); $EndingQuotePosition = strripos($row['ReplyContent'],"[/Quote]"); if($StartingQuotePosition !== false and $EndingQuotePosition !== false) { // [Quote] and [/Quote] found echo 'It worked!'; // Take the substring where it begins after [Quote] and ends before [/Quote] and put it in it's own string variable // Remove the substring [Quote] and [/Quote] from the string // Process the new string variable } Link to comment https://forums.phpfreaks.com/topic/173945-solved-strpos-and-strripos/ Share on other sites More sharing options...
tekrscom Posted September 11, 2009 Author Share Posted September 11, 2009 I figured it out, I needed to be using stripos instead of strpos... Link to comment https://forums.phpfreaks.com/topic/173945-solved-strpos-and-strripos/#findComment-916944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.