Re: functions????
| From: | Nick Winfield | Date: | Sat, 27 Jan 2001 23:38:36 +0000 |
| Subject: | Re: functions???? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37049@lists.php.net to get a copy of this message | ||
On Sun, 28 Jan 2001, Kumanan wrote:
> Hi,
>
> i got problem with functions ....
>
>
> when i call the files with url//filename.php?action=pal
>
> all the time it says
> Fatal error: Call to unsupported or undefined function pal_edit() in
> /cfiles/memberlink.php on line 7
>
Declare your functions before the switch() statement - your switch
statement is being executed before your functions even get a chance to be
defined. :)
e.g.
function sayBlah() {
echo "Blah!";
}
switch($task) {
case do_stuff:
sayBlah();
break;
case other_stuff:
# whatever
break;
default:
# whatever
break;
}
Cheers,
Nicky W..
-[ pioneer@dac.org ]-