I try to cut a text after the occurence of a specified character, in this case:
“
The text example is:
...text?“ Text,
I think this can be helpful for anyone :
$title = 'sometext?"othertext';
$pos2 = strpos($title, '"');
$title = substr($title, 0, $pos2+1);
echo $title;
Output:
sometext?"
If you want the text after the "
mark:
$title = 'sometext?"othertext';
$pos2 = strpos($title, '"');
$title = substr($title, $pos2+1);
echo $title;
Output:
othertext