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

Functions, Part I Forum

View Course » View Exercise

1151 points
Submitted by
over 2 years ago

Why isn't it working?

Hello everybody,
I want to ask something about the exercise "String Functions I". I tried perceived hundred of times different codes and I guess my fault is something really stupid, but I don't understand why the server does not except my code. It prints exactly what the instructions told me to print.

Please! Can somebody help me?

alt text

-2 votes


I think you have to use "print" instead of "echo". This code worked for me:

// Get a partial string from within your own name
// and print it to the screen!
$myname = "Matt";

$partial = substr($myname, 0, 2);
print $partial

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

// Make your name lower case and print it to the screen:
$lowercase = strtolower($uppercase);
print $lowercase;

1578 points
Submitted by
Matt Anderson
over 2 years ago

1 Comment

54fd9dc095e37890120042da_47343003 Natalie over 2 years ago

Thank you really much, even if this didn't work for me, I found my problem^^