Re: Variables

From: Date: Tue, 19 Dec 2000 23:03:33 +0000
Subject: Re: Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-31073@lists.php.net to get a copy of this message
I fixed my problem: I can't use $'s and "'s in my variable list, it has to be: $arryallvalues = array(frmid,stropendate,frmbusinessname, etc... ----- Original Message ----- From: "Chris" <php_list@ibcnetwork.net> To: "php" <php-general@lists.php.net> Sent: Tuesday, December 19, 2000 10:02 AM Subject: [PHP] Variables Hi, I am trying to get something like this to work, basically, cycle through all my variables and set any empty ones to 0. earlier: $frmid = 2; $stropendate = "12/12/2000"; Other varibles are empty. Later: $arryallvalues = array("$frmid","$stropendate","$frmbusinessname","$frmsdate","$frmedate, etc.. etc.."); for ($x=0;$x < 30;$x++){ $temp = $arryallvalues[$x]; if ($temp == ""){ $temp = 0; //==> All possibilites I can think of for setting empty variable to 0 $$temp = 0; $arryallvalues[$x] = 0; $$arryallvalues[$x] = 0; } } But all previoulsy empty varibles are still empty, they are not being set to 0, can anyone tell me why?

« previous php.general (#31073) next »