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

Functions, Part I Forum

View Course » View Exercise

536 points
67a9bc3ddf46a8ce9305f35eeab4ce93?s=140&d=retro
Submitted by
Enrico A. Garcia
about 2 years ago

why is this showing up?

This show up when I click on save and submit button:
Oops, try again. Did you remember to use strtolower() in your code?

Here is my code:

<?php
$myname = "Enrico";
// Get a partial string from within your own name
// and print it to the screen!
$partial = substr($myname, 0, 6);
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;
?>

okay what did I do wrong?
thank you for your help


1 vote

permalink

I believe it's because you call $uppercase in your strtolower section. It should work if you use
$lowercase = strtolower($myname);

Ultimately it will give the same output, but when the page verifies your code, it might expect the $myname variable

386 points
931fcca297a571d275f7e8205acadafa?s=140&d=retro
Submitted by
Lodal
about 2 years ago