/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function str_replace_once($needle , $replace , $haystack){ // Looks for the first occurence of $needle in $haystack // and replaces it with $replace. if ($pos === false) { // Nothing found return $haystack; } }