PDA

View Full Version : php string help



razor
July 8th, 2001, 22:02
this is what i want to do:

if $string is greater than 250 characters $x=1 else $x=0

what function would i use to do this?

Dusty
July 8th, 2001, 22:32
Is the function you want strlen?


if(strlen($string)>250){
$x=1;
}else{
$x=0;
}

There are other ways to write it, but this works just as well as any.

razor
July 9th, 2001, 06:48
thanks man