I have two strings and i want to concatenate string like john+smith
to jsomhinth
. i did this but array_combine
not showing the result set.
array_combine
is not working here
What is the use of array_combine?
<? php
//variable that store two string
$a ='JOHN';
$b='SMITH';
$val=str_split($a,1);
$val1=str_split($b,1);
//print_r($val1);
//print_r($val);
$c=array_combine($val,$val1);
print_r($c);
?>
This the code i tried i got two array with key and id i want connect the key with array combine and want this output is there any solution two concatenate two strings like that???
And want to know that why array_combine
not work there and what is the difference between array_combine
and array merge
.