Jump to content

[SOLVED] strpos and strripos


tekrscom

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.