Here are my Inputs :
$firstname=array
("Raj","Swati","Kunal","Hema","Kareena","Deepika","Shilpa","Amitabh","Shahrukh","Kangana");
$lastname=array
("Kumar","Sharma","Kapoor","Malini","Kapoor","Padukone","Shetty","Amitabh","Shahrukh","Kangana");
I need to create an array that will concatenate $firstname[i] with $lastname[$i}and thereby create an array that combines the first name and last name.
My output is below but it is not correct:
<?php
foreach($firstname as $first){
foreach($lastname as $last){
$fullname[]=$first." ".$last;
}
}
print_r($fullname);
?>
I probably should not be using a foreach loop but I am stuck.