[EMAIL PROTECTED] (John Fishworld) wrote:
> 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 !
> but as usual I' m having problems with the correct regex
what about something simple as:
$str = "/db/skod.gif";
if (strpos($str, "/") == 0) {
echo "Slash first";
} else {
echo "Slash not first";
}
--
Henrik Hansen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php