<?php $in = '“Chess helps us overcome difficulties and sufferings,” said Unnikrishnan, taking my queen. “On a chess board you are fighting. as we are also fighting the hardships in our daily life.” he said.'; $out = preg_split('/ (?=“)/', $in, 0, PREG_SPLIT_NO_EMPTY); //$out = preg_match_all('/“.+?(?= “|$)/', $in, $out) ? $out[0] : null; $find = '/[“”]/u'; // unicode flag is essential $replace = '"'; $out = preg_replace($find, $replace, $out); // replace curly quotes with standard double quotes var_export($out);
You have javascript disabled. You will not be able to edit any code.