A more ecconomical way with control statements??

From: Date: Mon, 07 Mar 2005 12:59:15 +0000
Subject: A more ecconomical way with control statements??
Groups: php.general 
Request: Send a blank email to php-general+get-210152@lists.php.net to get a copy of this message
if (empty($samosa)){ // do nothing } else { setcookie("cookie[samosa]", "$samosa"); } if (empty($pakora)){ // do nothing } else { setcookie("cookie[pakora]", "$pakora"); } It goes on like this for the whole menu I am looking for a more effiecient way to do this. The inputs are text boxes taking values from 0-9. Thanks Ross

« previous php.general (#210152) next »