)/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // loop stuff $stop = count($tarr); $next = true; for ($i = 0; $i < $stop; $i++) { $curl = $tarr[$i]; if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag $curl = str_replace('“', '”', $curl); $curl = str_replace('‘', '’', $curl); } elseif (strstr($curl, '