how do you count the characters in a string. ie: $company = "company"; $chop = chop($company); $count = count($chop); echo $count;
i basically want to find out how many characters are in the word company or how many character are in $company.
strlen (PHP 3, PHP 4 >= 4.0.0)
strlen -- Get string length Description int strlen ( string str) Returns the length of string.
hope this helps,
john
try using the strlen function.
$str = "8348935"; echo strlen($str)// returns 7