Problem with returning value from function

From: Date: Tue, 26 Jun 2001 22:14:31 +0000
Subject: Problem with returning value from function
Groups: php.general 
Request: Send a blank email to php-general+get-55289@lists.php.net to get a copy of this message
I am having problem getting the info back after I send it to a function. What I what to do is send the value $line two the function process it then return it with all the proper data in place . This function will process about 13 lines names $line1 through $line13 and when they return from the function I what to change each one back to the original variable but with the proceed data in them. This will be used in a mail script if ($line1){ //This is what is in Line1 Dear ##fullname## $line=$line1; proce($line); $line1=$line; } Function proce($line){ Global $fullname,$email,$hostdomain,$hostname,$domain,$tld,$baseip,$username,$password,$userdatabas, $newuser,$newuserpass,$sales; $domainname=$hostname . "." . $domain . $tld; $line = str_replace('##fullname##',$fullname,$line); $line = str_replace('##email##',$email,$line); $line = str_replace('##domain##',$domainname,$line); $line = str_replace('##username##',$username,$line); $line= str_replace('##hostdomain##',$hostdomain,$line); $line = str_replace('##sales##',$sales,$line); return $line; } Best regards, Richard mailto:rkurth@pacifier.com

« previous php.general (#55289) next »