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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -