Re: assign value to var

From: Date: Fri, 07 Jul 2000 21:37:10 +0000
Subject: Re: assign value to var
Groups: php.general 
Request: Send a blank email to php-general+get-5468@lists.php.net to get a copy of this message
Just like in C, use the "return". Unlike C, it's pretty loose so you can return strings or numbers or nothing from within the same function. function my_function() { return "Hello World!"; } echo my_function(); -- Matthew Leverton - matthew@aeroinc.net - http://www.allegro.cc -----Original Message----- From: n e T b r a i n <net-brain@net-brain.net> To: php-general@lists.php.net <php-general@lists.php.net> Date: Friday, July 07, 2000 4:33 PM Subject: [PHP] assign value to var >Hi, > >this couldn't make any sense, but I'm wondering How is possible to assign a >function to a variable.... I mean: > > my_function() { > print "Hello World!"; > } > > $my_var=(____the function above____) ; > >Any help will be appreciated. > >max

« previous php.general (#5468) next »