Variables
Posted: Mon Jan 15, 2007 12:32 am
Hi,
Is the following code bad practice:
allowing you to call on the variables with just:
$variable
rather than:
and calling the variables as:
$_POST['variable']
?
Thanks
Is the following code bad practice:
Code: Select all
foreach($_POST as $key=>$value){
$$key = ValidateOutput($value);
}$variable
rather than:
Code: Select all
foreach($_POST as $key=>$value){
$_POST[$key] = (ValidateOutput($value));
}$_POST['variable']
?
Thanks