You are here: Re: error due to function definition « All PHP « IT news, forums, messages
Re: error due to function definition

Posted by Vince Morgan on 12/28/07 01:34

"kenoli" <kenoli.p@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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация