> Now, what I'm trying to do is build a tree based on the data in the DB.  
> It's working relatively ok if I uncomment the code that is on line 48 and 
> comment out line 49.  However, what I really want to do is build a fully 
> associative array doing this and now** an array that has string keys but 
> then, those arrays having numeric keys (copy and run this code 
> un/commenting the lines above and you'll see what I mean).

** should be "not"

To elaborate, what I'm trying to do is build an array that looks like this:

$array["this"]["that"] = "whatever";
$array["this"]["other"] = "whatever";

and not one that looks like this:

$array["this"][0] = "that";
$array["this"][1] = "other";

because I just want to be able to get the keys and not have to worry
about when I should be using the value of the key or the value of the
array element.

Again, the problem that I'm having (as demonstrated by the code) is
that when I'm trying to set it up so that it's like the first example above,


isn't always evaluating as an array, though it always should.


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

Reply via email to