hey,
new question:
this code works fine but i'm sure there is more elegant solution. can somebody please point it some how .... thanks.
// $replacements is a assosiated array that converts "from" to "to"...
// if i use only the first function only the first $key/$value pair is changed...
$text ="long string of text here....";
function replaceCrap ($text) {
global $replacements;
while(list($k, $v) = each($replacements)) {
$text = str_replace($k, $v, $text)."<br>";
}
return $text;
//echo $moo;
}
function textLoop($text) {
for($i=0; $i<count($replacements); $i++) {
replaceCrap($text);
}
return $text;
}