PHP newbie ... function with several returns ?

From: Date: Sun, 16 Mar 2003 00:52:49 +0000
Subject: PHP newbie ... function with several returns ?
Groups: php.general 
Request: Send a blank email to php-general+get-139818@lists.php.net to get a copy of this message
Hi ... PHP newbie here. I'm migrating from ASP/vbScript. I'd like to set up a subroutine that will change several variables at once. In VB, I can say: Private Sub Change_Variables ($variable1, $variable2) $variable1 = "Something different from it's original value" $variable2 = "I'm changed also!!" End Sub // in my code I can call it like this: $My_variable1 = "This is the original value of variable1" $My_variable2 = "This is the original value of variable2" Call Change_Variables ($My_variable1, $My_variable2) // after calling this subroutine the variables are changed: print $My_variable1 // yeilds: "Something different from it's original value" print $My_variable2 // yields: "I'm changed also!!" I try to convert this to PHP, and I'm getting stuck. I'm sure there's a kind of function that can do this. Any ideas? TIA

« previous php.general (#139818) next »