...

View Full Version : How to set many variables to same value



guvenck
11-25-2006, 07:10 PM
Hello,

I had to use such commands in one of my scripts:



$apple = "";
$orange = "";
$berry = "";
$peach = "";
$banana = "";
$kiwi = "";
$mango = "";


is there a better syntax to set them all to "" in one line? Or should I build an array and make a loop?

marek_mar
11-25-2006, 07:11 PM
$apple = $orange = $berry = $peach = $banana = $kiwi = $mango = "";



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum