Re: how to get names of files...
| From: | Martin Smetak | Date: | Tue, 25 Jun 2002 13:57:31 +0000 |
| Subject: | Re: how to get names of files... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103775@lists.php.net to get a copy of this message | ||
> (if there's a.gif in the folder then I want $first to be "a.gif", IF
> there's also a "na.jpg" then I want then it should be $second .. if you
> know what I mean)
well, i think you don't want to have variable like $twentyfifth,
$hundredandthirtyfirst etc...
don't you rather use some array?
but try to use ${'variablename'}=$val
ex.:
for($i=0;$i<100;$i++)
{ $name='name'.$i;
${$name}=$i; }
You should get variables
$name0....$name99 with values 0..99.
But I'm writing w/o testing....
ByE,
Minca