DEV Community šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’»

DEV Community šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: PHP crash course : Strings and Numbers

Collapse
 
qferrer profile image
Quentin Ferrer • Edited on

Thanks for this great post! In this following example you shared:

$message = "Hello World";

echo $message[-1];
// e
Enter fullscreen mode Exit fullscreen mode

The result is d and not e šŸ˜„

Greetings,

Quentin

Collapse
 
ericchapman profile image
Eric The Coder Author

Oupss thanks. Corrected.