|
Posted by kenoli on 12/28/07 06:37
Thanks -- Worked perfect. Now I remember reading something about that
once.
--Kenoli
On Dec 27, 5:34 pm, "Vince Morgan" <vinharAtHereoptusnet.com.au>
wrote:
> "kenoli" <kenol...@gmail.com> wrote in message
>
> news:81eae516-e0d4-4f84-9420-dc675360e796@s8g2000prg.googlegroups.com...
>
> > I want to call a function if it has been defined and not call it if it
> > hasn't. I am using this code:
>
> > if (function_exists(editForm())) { editForm(); }
>
> The manual says the function name should be a string, and indicates the
> brackets aren't required.
> Ie
> if (function_exists('editForm')) { editForm(); }
>
> > I also tired:
>
> > if (editForm()) { editForm(); }
>
> I imagine this should cause a problem, as it will try to call the function
> in the evaluation, and if it isn't defined flip out. If the function
> returns a boolean then the matter is further complicated.
> HTH
> Vince
Navigation:
[Reply to this message]
|