Re: [PHP] How do I stop foreach if $menu not set??

2002-06-11 Thread hugh danaher
riginal Message - From: "Dan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 11, 2002 2:59 PM Subject: [PHP] How do I stop foreach if $menu not set?? > I Have worked out this, but when $menu is not set it does the foreach > function anyway, and despl

Re: [PHP] How do I stop foreach if $menu not set??

2002-06-11 Thread Stuart Dallas
On Tuesday, June 11, 2002 at 10:59:13 PM, you wrote: > I Have worked out this, but when $menu is not set it does the foreach > function anyway, and desplays an error. > What Can I do to stop the foreach function from working if $menu is not > set?? http://www.php.net/isset -- Stuart -- PHP

RE: [PHP] How do I stop foreach if $menu not set??

2002-06-11 Thread Lazor, Ed
Change introduction to a variable with $ in front of it or put it in quotes "introduction". > What Can I do to stop the foreach function from working if > $menu is not > set?? > > if ($menu==(introduction)) {$sub = array( > 'overview.php' => 'Overview', > 'moreinfo.php' => 'More Info' > ); > }

[PHP] How do I stop foreach if $menu not set??

2002-06-11 Thread Dan
I Have worked out this, but when $menu is not set it does the foreach function anyway, and desplays an error. What Can I do to stop the foreach function from working if $menu is not set?? 'Overview', 'moreinfo.php' => 'More Info' ); } #These parts are topics and there may be more than two. if