using print instead of echo

From: Date: Sat, 07 Sep 2002 13:59:51 +0000
Subject: using print instead of echo
Groups: php.general 
Request: Send a blank email to php-general+get-115603@lists.php.net to get a copy of this message
the example I have below.. I'm able to get working using the 'echo' command. But I would like to know how to format the same using the 'print' command. I am familiar with both. but with this one instance I am not sure how to format the print command correctly to get the same results as the echo command. Any suggestions would be appreciated. $variable1[0]="one"; $variable2[0]="two"; $variable3[0]="three"; $variable4[0]="four"; $j=1; while($j<5){ echo ${"variable"."$j"}[0]; $j++; }

« previous php.general (#115603) next »