I have the two following variables:
$contact_number=array('0123456','65321');
$msg="My Text" ;
I am trying to create an array like following using the above variables
$myarray =array(
array("0" => "0123456", "1" => "My Text"),
array("0" => "65321", "1" => "My Text")
);
I have tried the following code but it is not creating the exact array live above:
for($i=0; $i < count($contact_number); $i++ ) {
$myarray[] =array(array("0" =>$contact_number[$i], "1" =>$msg),);
}
var_dump($myarray);
Could you please tell me how to solve this problem