Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

Re: [PHP] assign value to var From: Matthew Leverton (matthew <email protected>)
Date: 07/07/00

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 <email protected> -
http://www.allegro.cc

-----Original Message----- From: n e T b r a i n <net-brain <email protected>> To: php-general <email protected> <php-general <email protected>> 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

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>