php-general | 2000071
Date: 07/07/00
- Next message: T.R. Henigson: "RE: [PHP] HTML MAIL"
- Previous message: Arthur Yeo: "[PHP] RE: [PHP-DB] PHP script calling C/C++ api"
- Maybe in reply to: n e T b r a i n: "[PHP] assign value to var"
- Next in thread: n e T b r a i n: "RE: [PHP] assign value to var"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: T.R. Henigson: "RE: [PHP] HTML MAIL"
- Previous message: Arthur Yeo: "[PHP] RE: [PHP-DB] PHP script calling C/C++ api"
- Maybe in reply to: n e T b r a i n: "[PHP] assign value to var"
- Next in thread: n e T b r a i n: "RE: [PHP] assign value to var"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

