I need to search and replace inside an associative array.
ex:
$user = \"user1\"; // I\'ve updated this $myarray = array(\"user1\" => \"search1\",
Using str_replace should work:
$myarray = array("user1" => "search1", "user2" => "search2" ) ; $newArray = str_replace('search1', 'search4', $myarray);