I need to make a loop in php that does 1 + 2 + 3 + 4 .... + 10 = 55 but icant get it to work. I did this:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
for ($i = 1; $i <= 10; $i++){
$sul = $i + $i + $i + $i + $i + $i + $i + $i + $i + $i;
echo "$i + $i + $i + $i + $i + $i + $i + $i + $i + $i = $sul<br>";
};
?>
</body>
Hope you can help me thanks :)