Jump to content


Photo

Count up


  • Please log in to reply
5 replies to this topic

#1 BTPlus

BTPlus
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 April 2006 - 09:55 PM

I'm looking for a script that will count up instead of down, like the one you find on the census site that counts population.

Thanks,
Kris

#2 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 12 April 2006 - 09:58 PM

Any chance you can be a bit more specific like what you want it for?

You can have a script to count up for a lot of things but saying where and what you want to use it in will help give others a lot more help in giving you a satisfactory answer.
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#3 BTPlus

BTPlus
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 April 2006 - 10:37 PM

As long as it counts up instead of down, what it's used for is not important. I want to be able to enter a beginning number in the script, add a multiplier and a time component, and have the script count from the beginning number upward by using the multiplier and the time component. In other words, start at 5000 and count by (add) 2 every 3 seconds.

Thanks,
Kris

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 12 April 2006 - 11:54 PM

What are you planning on doing with this number?

<?php
for ($i = 5000; $i < 100000; $i += 2) {
    echo $i.'<br>';
    sleep(3); }
?>

Ken

#5 earl_dc10

earl_dc10
  • Members
  • PipPipPip
  • Advanced Member
  • 71 posts

Posted 13 April 2006 - 12:48 AM

if you want a realtime counter I would recommend javascript
got a problem? Google helps many of those in need

#6 BTPlus

BTPlus
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 13 April 2006 - 01:18 AM

[!--quoteo(post=364232:date=Apr 12 2006, 07:54 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 12 2006, 07:54 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
What are you planning on doing with this number?

<?php
for ($i = 5000; $i < 100000; $i += 2) {
    echo $i.'<br>';
    sleep(3); }
?>

Ken
[/quote]


I was thinking about putting it on my website as a counter for the number of viruses that have been cleaned off of the computers I have worked on. I have kept records of the number of viruses and spyware I have clean off for my customers. I now have a calculated yearly average. I will setup the counter to automatically count.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users