sintax63 Posted February 14, 2010 Share Posted February 14, 2010 Once a user logs into their account on my site there is a badge type of image that shows a number inside it. I have my style sheet set up to display the number in the center - obviously. The problem is, once the number goes to two digits, it is no longer in the center of the image. I'm using this type of setup to get the count: $theCount = mysql_result(mysql_query("SELECT COUNT(*) FROM table WHERE id='$id'"),0); And then this to display it on the page: <div id="badge"><a href="<?php echo $theCount; ?></a></div> Any ideas? Link to comment https://forums.phpfreaks.com/topic/192028-possible-to-count-number-of-characters-in-a-query-for-page-display-issue/ Share on other sites More sharing options...
sintax63 Posted February 14, 2010 Author Share Posted February 14, 2010 I found the answer to this using strlen() Link to comment https://forums.phpfreaks.com/topic/192028-possible-to-count-number-of-characters-in-a-query-for-page-display-issue/#findComment-1012159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.