I have an Arabic paragraph which need to be split in half.
The delimiter is:
معلومات هامة
My attempt:
$st = utf8_encode("معلومات هامة");
$info = preg_split('/'.$st.'/', $paragraph);
It didn’t help, I get array with element 0 which hold the whole paragraph, so
info output is exactly as paragraph output.
Note: the paragraph has inconsistent newlines and spaces.
You can try with
mb_splitto handle UTF-8 content.Also you can try to prepend this function with: