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 - Unusual behaviour when drawing lots of images onto a large canvas -

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

javascript - Chart.js - setting tooltip z-index -