[PHP] Re: multi-dimensional array

2002-05-09 Thread J Smith
You can't set an array subscript using an array; it should be a numerical value or a string. What you want to do is $division[$div_id] = $array; Better yet, try: $divison[$div_id] = mysql_fetch_array($result, MYSQL_ASSOC); J Steve Buehler wrote: I am trying to learn some new things

[PHP] RE: Multi-dimensional array issue

2001-08-21 Thread Tim Ward
The first thing is that 2-dimensional arrays don't really exist in php. Any element of any array can be another array. The second important point is that all php arrays are associative. If you don't declare the key of an element (e.g. $out[] = fred) when creating it you get the next integer

Re: [PHP] RE: Multi-dimensional array issue

2001-08-21 Thread Nick Davies
-- From: Ken Hopkins [SMTP:[EMAIL PROTECTED]] Sent: 20 August 2001 21:02 To: [EMAIL PROTECTED] Subject: Multi-dimensional array issue Hi from a recent PHP convert, Having a heck of a time declaring and accessing 2 dimensional info

[PHP] Re: Multi-dimensional array issue

2001-08-21 Thread Ken Hopkins
Ok, let me make sure I understand: I see that you included brackets after the $out ($out[] = array instead of $out = array). Does this denote that the $out is now a zero-based array? $out[0] is now an array that has $name, $srch, $sel and $case as single elements in that array. $out[1] is the

[PHP] Re: Multi-dimensional array issue solved

2001-08-21 Thread Ken Hopkins
Thanks; after some all-nighter testing have come up with a solution. Will definitely have to access the individual variables as (quoted_strings) instead of ($variable). Looks like this works: ? $out = array(0 = array(name, srch, sel, case, qvalues = array(0 = array(values, valtypes),