Variables
| From: | Chris | Date: | Tue, 19 Dec 2000 18:02:01 +0000 |
| Subject: | Variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31047@lists.php.net to get a copy of this message | ||
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?