note 32197 added to function.create-function

From: Date: Tue, 20 May 2003 09:28:32 +0000
Subject: note 32197 added to function.create-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-48645@lists.php.net to get a copy of this message
if you wanna use a function as an alias of a longer code such as functions in javascript, you should simply make an include of a file which contains the full code. Posted this 'cos this was my situation and i wasted a lot of time trying tu use php functions like JS functions. If anyone knows how to do this without including a file (which can be slow and annoying) please send a mail. exemple of what id like to do : $func = //function id like to know if ($a==1) { do this } else { do that } this would help including just a variable into a html file which is already included into a php file. ---- Manual Page -- http://www.php.net/manual/en/function.create-function.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32197 Approve Note -- http://master.php.net/manage/user-notes.php?action=approve+32197&report=yes Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32197&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32197&report=yes

« previous php.notes (#48645) next »