Hi

Can anyone tell me why i'm getting this error?

Fatal error: [] operator not supported for strings in 
c:\inetpub\wwwroot\Iweb-sites\Exp\menu2.php on line 41

[code]:


$rst2=sql_call("SELECT * FROM tmenu WHERE parent=".$r['id']);
// now have array of corporate, entertainment and identity

for ($i=0; $i < mysql_num_rows($rst2); $i++) {
 $r=mysql_fetch_array($rst2);
 $level2[$i] = $r['name'];
 $rst3 = sql_call("SELECT * FROM tmenu WHERE parent=".$r['id']);
 
 while ($a=mysql_fetch_array($rst3)) {
      $level2[$i][] = $a['name']; // giving error here
     }
 
}



[/code]


Regards
Andrew McCombe
Interactive Web Solutions (Stafford)
Tel: 01785 279921



-----------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 (0) 1785 279920  and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Interactive Web Solutions' management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Interactive Web Solutions makes no 
representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).

Reply via email to