Quote:
Originally Posted by firefly007
str_ireplace() Is kind of a built in php function, not sure why its kicking that error on Xampp, I will see if there is a fix. Im not getting that error on my Unix box.
|
str_replace is standard php function not str_ireplace.
and the best thing to use to shorten the name is
PHP Code:
function search_word($word, $search){
global $search;
if(empty($search))return $word;
$search = str_replace("+"," ",$search);
$newterm = str_ireplace($search,"<span class=\"highlight\">$search</span>",$word);
return $newterm;
}
$myData = $row["name"];
$name_clean = search_word(substr($myData,0,20)."...", $search))
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in
BT.Manager™ forum
My Current Demo is here
http://demo.btmanager.org/