I am trying to make a simple program that will count the powers of a number.
For instance, if you put in variable X = "5"; it would count up the powers of five. If you could help me I would be glad.
Use pow() in a loop, e.g.:
$x = 5; $high_power = 10; for ($i = 0; $i <= $high_power; $i++) { echo pow($x, $i) . '<br />'; }
Thanks mate,!