Im learning PHP now and was given a task which I thought I could follow through, but I get an
'int(459)'
printed out on the website.
Here is the task and my attempt to solve it: Multiply your age by the numbers of yours you went to school and put it isnide of variable named total. Then minus the total by 3. Then check, if total is greater or equal to 12 and put the result inside of another variable. Then use var_dump to see if its true, or false.
<?php
$age = 33;
$schoolyears = 14;
$total = $age * $schoolyears;
$total -= 3;
$total >= 12;
$newVar = $total;
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
var_dump($newVar);
?>
</body>
</html>
Appreciate your answers! Rob
UPDATE!
After editing it lloks like this and it works.
<?php
$age = 33;
$schoolyears = 14;
$total = $age * $schoolyears;
$total -= 3;
$total = $total >= 12;
$newVar = $total;
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
var_dump($newVar);
?>
</body>
</html>
It puts out :
bool(true)