On 1/8/06, Khorosh Irani <[EMAIL PROTECTED]> wrote:
> Hello
> How I can get the power of an integer number (for example 8 power 2=64) only
> with loops (without pow() function)?
> Thanks
>
>

Is this for your homework? Untested:

<?php
$num=8;
$power=2;

for ($i=0; $i<$power;$i++) {
   $num*=$num;
}

?>

Dotan Cohen
http://technology-sleuth.com/short_answer/what_is_hdtv.html
&^
)

Reply via email to