I have peoples name variable $name, how to count how many characters for each name?

i have a field, the field name is name, like
John
Robert
etc

the variable to call name is $name

now i need to display how many characters each name have, for example
John : 4 characters
Robert : 6 character

how to get characters numbers by using the name variable $name, what is the query looks like?

thank you & GBU for all that helping

Have a look at http://php.net/manual/en/function.strlen.php

Or if they might have multi-byte characters, http://php.net/mb_strlen