This function returns the numbers 1 - 1000 squared.
How can I add all of the numbers together instead of listing them individually?
function addexp() {
$y=0;
for ($i=0; $i<1000; $i++){
echo pow(++$y,2) . "<br>";
}
}
$func = 'addexp';
$func();
How can I add all of the numbers together instead of listing them individually?
