i am taking a class in PHP and get emailed assignments, this one was to provide the output to the following code, but the code the teacher sent doesnt seem to work.
im getting :
Parse error: syntax error, unexpected '*' in C:\xampp\htdocs\assignment5.php on line 15
heres code:
for ($n = 0; $n < 8; $n++)
{
print $n;
switch ($n % 3)
{
case 0 : print (“H”);
case 1 : print (“E”);
break;
case 2 : print(“\n”);
}
}
print (“\n”);
print (“***”);
print (“\n”);
$n = 10;
while (++$n <= 13)
{
print $n;
}
do
{
print $n;
}
while(++$n <= 12);
print (“\n”);
print (“***”);
print (“\n”);
for ($n = 1; $n * $n < 60; $n += 3)
{
print $n;
print (“\n”);
}
for ($n = 4; $n > 0; $n--)
{
for ($m = 0; $m <= $n; $m++)
{
print (“+”);
}
print (“\n”);
}
anyone able to help?