PDA

View Full Version : PHP help



razor
February 19th, 2001, 16:41
how would i test if the first character of a string starts with the letter "z"?

Woofcat
February 19th, 2001, 20:14
Case sensitive:

if(substr($string,0,1)=='z')
{
}

Case insensitive:

if(strtolower(substr($string,0,1))=='z')
{
}

razor
February 19th, 2001, 21:33
i figured out the first one, but thanks any way