I need to search and replace inside an associative array.
ex:
$user = \"user1\"; // I\'ve updated this $myarray = array(\"user1\" => \"search1\",
Why not just do
if (isset($myarray[$user])) $myarray[$user] = 'search4';