Hi Folks,
I have a problem assigning an 3dim array, maybe I´m to tired today to see the
mistake, but PHP thinks, that it finds "Illegal string index" at the marked line.
could someone verify this, maybe find my mistake??
FYI getDbAns(), talk2DB are substitutions for DB - related routines, and the
produce the correct data. 
Sorry for the "overcommented" code, but I have syntax highlighting.
TIA Oliver

while( $res=$UDV -> getDbAns()) // fetch mains
    if(strlen($res[0]) > 2) // if result is OK
       $menarr[$h]=$res[0]; // put them in array
       // get submenues
       $selchi="select chi from link where pa = '$res[0]'";
       $UDB ->  talk2DB($selchi);
       while($chia=$UDB -> getDbAns())
          if(strlen($chia[0]) >3) // if result is OK
             //echo "<b>".$chia[0]."</b><br>";
             // Youll get a <0x20> separated string
             $subp=explode(" ",$chia[0]); // explode it, to get single values
             if(is_array($subp)) // if there are more than one in it
                $maxs=count($subp); // check out how many
                for($n=0; $n < $maxs ; $n++)// each child in main/sub/n
                   // put the value in main/sub/n
error here  ->   $menarr[$h][$s][$n]=$subp[$n];
             else // if there´s only one value
          }// end if sub
          $s++; // submenues plus one

       }// end while subs
    }// end if main

    $h++; // mainmenues plus one
}// end while mainmenues

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

Reply via email to