Adam Adam - 1 year ago 117
PHP Question

How to count inverse with for in php?

My Problem: I want to count inverse in the for loop.

This is the opposite of what I want to do:

echo $i;

If I put
doesn't works (my server crashes).

Help meeee!

Best Regards,

Answer Source

When you say $i-- crashes your server, did you change the initialization and condition for $i?

for($i=10; $i>=1; $i--){
    echo $i;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download