Hi Guys Please help me in creating an array like below
array (
array ( "5555776741" , "Don0454545" , "Draper" ),
array ( "5551112239" , "betty777777" , "Smith" ),
array ( "9999999999", "test", "name")
)
From an array $contacts which prints as below with print_r($contacts) as:
Array
(
[0] => Array
(
[phone_mobile] => +16046799329
[first_name] =>
[last_name] => test
)
[1] => Array
(
[phone_mobile] => 7326751700
[first_name] => Ralph
[last_name] => OBrien
)
[2] => Array
(
[phone_mobile] => 3204937568
[first_name] => Chris
[last_name] => Barth
)
)
Im trying to achieve from the below code : but the value passed is not assigned from $contact to $record the Print_r($contact) prints empty arrays.
foreach ($contacts as $contact)
{
$record =$contact;
}
$recordis a flat variable you need the[]after it to "push" to it