note 50774 deleted from function.sqrt by mazzanet
| From: | mazzanet@php.net | Date: | Fri, 08 Jul 2005 07:20:23 +0000 |
| Subject: | note 50774 deleted from function.sqrt by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91636@lists.php.net to get a copy of this message | ||
Note Submitter: aaton dot a at web dot de
----
to php at primezero dot com:
why don't you just do it a lot more simpler.
You don't need any sqare roots or regular expression, just
pow(value,2). Then you can just replace value with the numbers 1 to how many numbers you want to
get.
The code could look like this:
<?php
for($x = 1; $x < 101; $x++) {
$val = pow($x, 2);
echo "$val <br>";
}
?>