Code: Select all
$myarray = array( "1" => "one", "2" => "two");
$string = "1 2";
echo str_replace($key, $value, $string);
$value should be the value of $myarray
is there anyway to do this? because it's trouble some using seperate array for this case