Need help with this array
| From: | Charles Kline | Date: | Mon, 21 Apr 2003 19:39:56 +0000 |
| Subject: | Need help with this array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144703@lists.php.net to get a copy of this message | ||
I have an array which is created (perhaps incorrectly?) like this:
$default_peeps = array();
while ($peeps_row = $peeps_result->fetchRow(DB_FETCHMODE_ASSOC)){
$default_peeps[] = $peeps_row['person_id'];
$default_peeps[][] = $peeps_row['is_primary'];
}
When I print_r() the array I get this:
Array ( [0] => 1649815377 [1] => Array ( [0] => N ) [2] => 890812244 [3] => Array ( [0] => N ) [4] => -408244191 [5] => Array ( [0] => Y ) )
I am able to get the first value (person_id) like this:
echo $default_peeps[0];
But I am not sure how to get the other part (N) for that person - the value of is_primary
Thanks for any pointers.
charles