You'll have to use the function to find out if the function is defined.
http://php.net/function_exists

You may want to mess with method_exists and try to define it as a method
rather than a global function, which is what I think you are doing at this
point.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Lukas <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 5:34 PM
Subject: private functions


> Hello,
>
> Sorry, i posted this to my local newsfeed a while ago but i don't think it
> is propogating properly, however i apologise if this appears twice.
>
> ---
>
> i've been using private functions like the code below a little, and just
> discovered that if you call the outside function more than once you get an
> error. Apparently it doesn't like redeclaring the inside function the
second
> time you call the outside function... this seems strange to me.
>
> Any help would be appreciated.
>
> <?
> function foo(){
>
>   function private_to_foo(){
>    echo("this is private to foo\n");
>   }
>
>   // call my private function
>  echo("Hello, calling my private function....\n");
>   private_to_foo();
> }
>
> // call our function
> echo("About to call foo\n");
> foo();
>
> // if you call it again it dies
> foo();
>
> ?>
>
> Lukas
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to