This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

121 points
Ca4095d8df31ed4566cba15e7f603ffc?s=140&d=retro
Submitted by
Dominic N.
almost 2 years ago

Syntax Error for Section 2.8

<?php
// Get a partial string from within your own name
// and print it to the screen!
$myname = "Dominic";
$part = substr($myname, 0, 4);
echo $part
?>


<?php
// Make your name upper case and print it to the screen:
$myname = "Dominic";
$upcase = strtoupper($myname);
echo $upcase
?>


<?php
// Make your name lower case and print it to the screen:
$myname = "Dominic";
$locase = strtolower($myname);
echo $locase
?>

All the echo lines don't have a semicolon at the end but the page still outputs with no errors. If I should post this elsewhere, please advise.