note 49035 modified in language.variables by danbrown

From: Date: Sun, 20 Jul 2008 16:09:24 +0000
Subject: note 49035 modified in language.variables by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142157@lists.php.net to get a copy of this message
<?php // I am beginning to like curly braces. // I hope this helps for you work with them $filename0="k"; $filename1="kl"; $filename2="klm"; $i=0; for ($varname = sprintf("filename%d",$i); isset ( ${$varname} ) ; $varname = sprintf("filename%d", $i) ) { echo "${$varname} <br>"; $varname = sprintf("filename%d",$i); $i++; } ?> --was-- <? // I am beginning to like curly braces. // I hope this helps for you work with them $filename0="k"; $filename1="kl"; $filename2="klm"; $i=0; for ($varname = sprintf("filename%d",$i); isset ( ${$varname} ) ; $varname = sprintf("filename%d", $i) ) { echo "${$varname} <br>"; $varname = sprintf("filename%d",$i); $i++; } ?> http://php.net/manual/en/language.variables.php

« previous php.notes (#142157) next »