How to convert Function into the variable?
| From: | Labunski | Date: | Thu, 04 Mar 2004 20:45:58 +0000 |
| Subject: | How to convert Function into the variable? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179498@lists.php.net to get a copy of this message | ||
Hi, I need to convert the script below into the variable " $content ".
How to do this?
I need this because I want to have an output of this function anywhere where
the $content is.
if ($action=="people"){
function output() {
$file = file("people.txt");
foreach($file as $value ){
print "$value<br>";}
}
output(); //maybe I don't need to have this line here, I'm not sure.
}else{
error ();
}
If you don't understand what I said, you can email me: labunski@latnet.lv
Thank you very much,
sorry for my bad english,
Roman