> On 4/11/06, Bing Du <[EMAIL PROTECTED]> wrote:
>> => foreach ($sponsor_id as $sponsor => $arr)
>> echo "$sponsor:";
>> foreach ($arr[$sponsor] as $project) {
>> echo "$project<br>";
>> }
>> =>
>
> It looks like you're building your array just fine. Here though, your
> second foreach needs to look like this:
>
> [code]
> foreach ($arr as $project)
> {
> echo "$project<br>";
> }
> [/code]
>
> Your temprorary $arr variable contains only your array of titles, not
> an entire row of your 2-dimensional $sonsor_id array. So you do not
> need to use the $sponsor key to get at that array.
>
Thanks so much for pointing out that error on $arr, John. You are very
right. Now I realize it's such an obvious error. But I did not notice it
before I posted.
Bing
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php