> -----Original Message----- > From: John Fishworld [mailto:[EMAIL PROTECTED]] > Sent: 30 April 2002 09:32 > > I'm trying to find files in my array > for example > ="lg_imode.gif" > and > ="/db/imodeklein/edgar-IMODE-1-.gif" > > I want to differentiate between the files with slash at the > front and ones > without so that > I can add a server path !
If all you want is to differentiate the ones where the first letter is a "/", why don't you just check exactly that? foreach ($array as $key=>$fname): if ($fname{0} =='/'): // begins with slash -- add server path endif; endforeach; Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php