Re: Need help with this array
| From: | CPT John W. Holmes | Date: | Mon, 21 Apr 2003 19:56:00 +0000 |
| Subject: | Re: Need help with this array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144708@lists.php.net to get a copy of this message | ||
> $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
looks like you need $default_peeps[1][0];
---John Holmes...