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
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
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'
> );
> }
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
4 matches
Mail list logo