I have string like this :
Suède · Slovénie
I need to explode it by · i have tried various solutions like :
preg_split("/[?·]/",strip_tags($single->children(2)->outertext))
explode(chr(149), strip_tags($single->children(2)->outertext));
explode(utf8_encode('·'),strip_tags($single->children(2)->outertext));
explode('·',strip_tags($single->children(2)->outertext));
But none of solutions works for me! can any one please let me know?
You shall rather use mb_split():
var_dump(mb_split('·', 'Suède · Slovénie'));
gives
array(2) {
[0]=>
string(7) "Suède "
[1]=>
string(10) " Slovénie"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With