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

Functions, Part I Forum

View Course

281 points
518d4c48b047b9d2760017bb_484778082
Submitted by
Lmar
almost 2 years ago

functions part 1 2/8... what's wrong with my code?

I'm getting a flag "Oops, try again. Did you remember to print your name in UPPERCASE?"

Here's my code:


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


0 votes

permalink

try with an echo, your code seems good

688 points
055cc5b4dc49d45934274f9436a4c6f6?s=140&d=retro
Submitted by
Juan Carlos Aragon
almost 2 years ago