I have a for loop in PHP and want to access the $f variable outside the loop. Is there a certain way to do this? I searched for the answer but can't find the right one.
foreach($dirlist as $f) {
}
filemtime($f)
Update:
I just went the more simple way and ended up doing this:
date('M d, Y', filemtime(getcwd().'/index.php'))
$fwill be the last element in the array?$f? Each iteration will have different$f.filemtimein loop? Could you clarify, what you want to achieve?