Hey all,
Hope someone is able to help me out here
As suggested by the title, I'm using a 4 dimensional array to hold category information (hierarchially). I know the right data is in the right places in the array because I can do a print_r($array) statement and it shows it correctly.
But here is the dilemma:
I'm using a pair of loops to get down to the fourth level in the array:
And it just isn't working. No errors, warnings etc. Anything placed after that first while() statement just doesn't execute. Just above that I have:PHP Code:while ( list($key1,$val1)=each($cache["$categoryid"]) ) {
while ( list($key2,$category)=each($val1) ) {
which works fine and produces this:PHP Code:print_r($cache[$categoryid]);
which is exactly as it should be.PHP Code:Array
(
[1] => Array
(
[0] => 1
[catid] => 1
[1] => Advertising Services
[name] => Advertising Services
[2] => 0
[parent] => 0
[3] => Advertising Services
[description] => Advertising Services
[4] => 189
[visits] => 189
[5] => 0
[hide] => 0
)
)
I've been coding all day now so it's probably something silly but I'm getting desperateany help is extremely appreciated.
Thanks in advance
P.S. In case you're wondering what on earth this has to do with recursive functions, it is being used in a recursive function




any help is extremely appreciated.

) then I'll see about doing a class.

Bookmarks