- print_r: documentation ( source)
- str_replace: documentation ( source)
<!DOCTYPE html>
<html>
<body>
<?php
$arr = array("blue","red","green","yellow");
print_r(str_replace("\\","yey",$arr,$i));
echo "<br>" . "Replacements: $i";
?>
<p>\In this example, we search an array to find the value "red", and then we replace the value "red" with "pink".</p>
</body>
</html>