Jump to content

Possible To Count Number Of Characters In A Query For Page Display Issue?


sintax63

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.