RE: sending a variable variables to a function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function needs to be declared without "variable variable"

Du like this instead:

function my_function($module) {
	// do something with $module
}

And then you call the function with the variable variable:

my_function($$module_no);

/Peter

-----Original Message-----
From: Ross [mailto:ross@xxxxxxxxxxxxx] 
Sent: Tuesday, August 08, 2006 7:26 PM
To: php-general@xxxxxxxxxxxxx
Subject:  sending a variable variables to a function

I want to send variable variables to a function but I cannot seem to get the

syntax correct. This is what I have so far...


 function my_function ($$moule_no) {

// do something with $$module_no



}


my_function ($module1)
my_function ($module2)
my_function ($module3) 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux