[snip]
You receive a string, so you need to find a function that will return
the size of a string. I bet you will find the function in string section

of the manual.
[/snip]

A good starting place for this is string length in the manual at
[url]http://www.php.net/strlen[/url]

Have a productive and positive day