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

Functions, Part I Forum

View Course » View Exercise

142 points
2e26e0f10d430a999df978261e8075b8?s=140&d=retro
Submitted by
Justin Weissert
about 3 years ago

Please help!!!!!

<?php
$myname = "Justin";

// you can manipulate strings easily
// with built-in funtions too
$partial = substr($myname, 0, 3);
print $partial;
?>


<?php
$uppercase = strtoupper($myname);
print $uppercase;
?>


<?php
$lowercase = strtolower($uppercase);
print $lowercase;
?>


-2 votes

permalink

This Works

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


<?php
// Make your name upper case and print it to the screen:
echo strtoupper("menixator")
?>


<?php
// Make your name lower case and print it to the screen:
echo strtolower("MENIXATOR");
?>

746 points
54b3f61295e378f86d008842_68761315
Submitted by
Riley Moos
almost 3 years ago

2 Comments

54b3f61295e378f86d008842_68761315 Riley Moos almost 3 years ago

""
<?php
// Get a partial string from within your own name
// and print it to the screen!
echo substr("Menixator",3);
?>
""
""
<?php
// Make your name upper case and print it to the screen:
echo strtoupper("menixator")
?>
""
""
<?php
// Make your name lower case and print it to the screen:
echo strtolower("MENIXATOR");
?>
""

54b946c386f552a3880060c3_940717212 danielper almost 3 years ago

"Oops, try again. Did you remember to print your substring?" :/


0 votes

permalink

Did you remember too keep it between the p tags? Otherwise it wont work.

256 points
Fd51c37c34db340a9fac5a98ea4b192a?s=140&d=retro
Submitted by
CodeIdle
about 3 years ago