Hi everyone,
I am not very much familiar while working with arrays. I have a situation where i have to add an array into an array. the code without loop is:
Now im trying to use it with while loop something like this
This is failing me because its showing a single array whereas i need arrays inside an array. Please guide me how i can achieve this.
thank you.
I am not very much familiar while working with arrays. I have a situation where i have to add an array into an array. the code without loop is:
Code:
$value = array(array('Ottawa, Canada', 'Ottawa'), array('Montreal, Canada', 'Montreal'));
Code:
while($rs = mysql_fetch_assoc($qry))
{
$add_addresses[] = array($rs['address'], $rs['country']);
}
thank you.
Comment