2. string functions i


#1

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

Hi guys,
I can't solve this exercise.

I think everything's ok, I can see the printed words on the right but when i click on save and submit this message appears :
"Oops, try again. Did you remember to print your name in UPPERCASE?"

I don't know why!

 <?php
     $name = "Cristina";
    $partial = substr($name, 0, 4);
    print $partial;
    
    $lowercase = strtolower($name);
    print $lowercase;
    
     $uppercase = strtoupper($name);
     print $uppercase;

    ?>

Help Please!


#2

oooops I understood the mistake!
Sorry :smiley:


#3

Exactly the same problem here - can you give me a hint, please?


#4

You don't have to write all in the first part of the code. There are three parts already set in the code!



<?php
$name = "Cristina";
$partial = substr($name, 0, 4);
print $partial;
?>



<?php

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

?>



<?php
// Make your name lower case and print it to the screen:

$lowercase = strtolower($name);
print $lowercase;

?>



#5

Thank you! :slight_smile: