In PHP, you do this to replace more then one value at a time.
<?php
$string = "i am the foobar";
$newstring = str_replace(array('i', 'the'), array('you', 'a'), $string);
echo $newstring;
?>
How do you do this in javascript?
In PHP, you do this to replace more then one value at a time.
<?php
$string = "i am the foobar";
$newstring = str_replace(array('i', 'the'), array('you', 'a'), $string);
echo $newstring;
?>
How do you do this in javascript?