$x=5;
$word="hello";
echo "This is a sentence";
print "The value is $x";
echo "Conditional statements:
";
if($x > 5) {
print "$x is greater than 5";
}
if($word == "hello") {
print "The word is hello";
}
else {
print "The word is not hello";
}
echo "For loops:
";
for($i=0; $i<=30; $i++) {
echo "i is currently $i";
}
for($i=1; $i<20; $i=$i+5) {
echo "i is currently $i";
}
function subtract($x, $y) {
$value = $x-$y;
return $value;
}
function print_hello() {
echo "Hello World";
}
$result=$subtract(10,5);
echo "$result
";
print_hello();