I am doing some array combine in php. But while combining/mapping the key of one array to value of another array i want to do some string replace in the value of the array which is going to be combined. How to use str_replace along with array_combine in php. Mostly without forloop.
Eg:
$a1 = array("35","37","43");
$a2 = array("Testing's", "testing's", "tessting's");
Normal combine is like below, (i.e) removing ' in those string while combine.
$a3 = array_combine($a1, $a2);
Output i want is like below,
array(
35 => "Testing",
37 => "testing",
43 => "tessting"
)
str_replace()will happily receive an array.