Update: The $string can have one ore more ";". I have to look after the last one.
$string = "Hello world; This is a nice day; after";
$out[] = trim( substr( strrchr ($string, ";"), 1 ) );
$out[] = trim( substr( strrchr ($string, ";"), 0 ) );
var_dump($out);
result: array(2) { [0]=> string(3) "after" [1]=> string(5) "; after" }
but what I need is:
array(2) { [0]=> string(3) "after" [1]=> string(5) "Hello world; This is a nice day" }
How should I do it?
explode()instead?