> (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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php