php - Generate an incremental $variable when in a for loop -


this question has answer here:

i'd increment variable within loop "$filename" turns "$filename1" , $filename2"?

$filename = false; $filename1 = false; $filename2 = false;      ($i = null; $i <=2; $i++){   $filename = $this->blabla; } 

use variable variables:

${"filename".$i} = $this->blabla; 

documentation


Comments

Popular posts from this blog

html - Cut text on left side inside button while centering -

plugins - CodeIgniter support on netbeans 8.0 -

php - Selecting items from MySQL for a status update feed efficiently while accounting for possible spam -