dynamic variable names php
I'm trying to use dynamic variable names (I'm not sure what they're actually called. But pretty much this


    for($i=0;$i<=2;$i++){
    $("file".$i) = file($filelist[$i]);
    }
    
    var_dump($file0);



This is coming up null which tells me it's not working. I have no idea what the syntax or the technique I'm looking for is here, which makes it hard to research. Filelist is defined earlier on.

Thanks
dynamic variable names php
===

I'm trying to use dynamic variable names (I'm not sure what they're actually called. But pretty much this


    for($i=0;$i<=2;$i++){
    $("file".$i) = file($filelist[$i]);
    }
    
    var_dump($file0);



This is coming up null which tells me it's not working. I have no idea what the syntax or the technique I'm looking for is here, which makes it hard to research. Filelist is defined earlier on.

Thanks