RE: Problems with multiple arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, sent the wrong code.

<?php
$array_ids = array('id_1', 'id_2', 'id_3', 'id_4');
$array_names = array('name_1', 'name_2', 'name_3', 'name_4');
$array_emails = array('email_1', 'email_2', 'email_3', 'email_4');

$full_data [] = $array_ids;
$full_data [] = $array_names;
$full_data [] = $array_emails;

foreach ($full_data[0] as $key => $value)
{
  echo $full_data[0][$key], ' - ', $full_data[1][$key], ' - ',
$full_data[2][$key], ' <br>';
}
?>

Result:

id_1 - name_1 - email_1
id_2 - name_2 - email_2
id_3 - name_3 - email_3
id_4 - name_4 - email_4


************************

This message has been delivered to the Internet by the Revenue Internet e-mail service

*************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux