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

Functions, Part I Forum

View Course » View Exercise

611 points
E7a458bbae5b0159cf5b08aa5f091aea?s=140&d=retro
Submitted by
holyschmidt57
over 2 years ago

What am I doing wrong?

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

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

<?php
// Make your name lower case and print it to the screen:
$lowercase = strtolower($uppercase);
print $lowercase;
?>
It is correct on the preview however it keeps asking me if I put my name in UPPERCASE.


0 votes

permalink

the lowercase should take your name also :
$lowercase = strtolower($myname);
print $lowercase;

957 points
Picture
Submitted by
ghighe88
over 2 years ago