How to count how many characters

  • basketmen
  • Student
  • Student
  • basketmen
  • Posts: 68

Post 3+ Months Ago

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
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

What programming language is this in?

If it is PHP, you would just use:

PHP Code: [ Select ]
echo strlen($name);
  • basketmen
  • Student
  • Student
  • basketmen
  • Posts: 68

Post 3+ Months Ago

yes its php, many many many thanks, gbu

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 127 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.