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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -