KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a quick question, which is probably easy to answer. I've goolged around, but not sure if I am searching correctly or what. Anyway, using PHP, how can I increment by halves? For example, I know I can use the following loop: <?php for ($i=1; $i<21; $i++) { print($i); } And it will print 1 - 20. But, how can I get it to output something like the following: 1 1.5 2 2.5 etc... Sorry for my ignorance on this, I'm just not sure how to go about it. Thanks!
Tags (comma-separated)
Save Edits
Cancel