Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
selectric
Regular
Regular



Joined: Aug 06, 2008
Posts: 65

PostPosted: Fri Sep 11, 2009 9:05 am Reply with quote

Hello and thanks for your time!

I'm looking for some sort of php jimmy code that will switch my hit counters from:

1087209
to
1,087,209

From
19456
to
19,456

and so on...
Any ideas? Any ideas on how to use this:
Code:


$result = $db->sql_query('SELECT type, count FROM ' . $prefix . '_counter WHERE type=\'total\'');
$myrow = $db->sql_fetchrow($result);
$count = intval($myrow['count']);



mixed with something along these lines:
Code:


$description3 = ereg_replace('_', ' ', $description2);
if(strlen($description3) > 0) {
$description3 = substr($description2,0,300);
$description3 .= '.....';
}
[/code]
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Sep 11, 2009 9:21 am Reply with quote

http://us2.php.net/number_format

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
selectric







PostPosted: Fri Sep 11, 2009 10:15 am Reply with quote

Thanks for that link!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©