String Functions I


#1

whats wrong?

String Functions I

Oops, try again. Did you remember to print your name in UPPERCASE?

<html>
  <p>
 <?php
 // Get a partial string from within your own name
 // and print it to the screen!
$myname = "Eric";
$partial = substr($myname, 0,6);
print $partial;
 ?>
 <?php
 // Make your name lower case and print it to the screen:
 $lowercase = strtolower($uppercase);
 print $lowercase;
 ?>
 <?php
 // Make your name upper case and print it to the screen:
 $uppercase = strtoupper($myname);
 print $uppercase;
 ?>
</p>
</html>

#2

Hi linkin,

you are providing $uppercase variable to the strtolower function, but there is no $uppercase variable defined anywhere.

$lowercase = strtolower($uppercase);

should be

$lowercase = strtolower($myname);

Your name contains in the variable $myname, so make sure to pass this to the strtolower and strtoupper functions


#3

im change that but still not working



<?php
// Get a partial string from within your own name
// and print it to the screen!
$myname = "Eric";
$partial = substr($myname, 0,6);
print $partial;
?>
<?php
// Make your name lower case and print it to the screen:
$lowercase = strtolower($myname);
print $lowercase;
?>
<?php
// Make your name upper case and print it to the screen:
$uppercase = strtoupper($myname);
print $uppercase;
?>



#4

please paste in the exercise link


#5

https://www.codecademy.com/courses/web-beginner-en-7I7Xm/0/2?curriculum_id=5124ef4c78d510dd89003eb8


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.