PHP TutorialLesson 9Free preview
PHP Strings
This lesson is part of PHP · All levels
Summary
Strings are a type of data for storing text, such as names and sentences. This lesson discusses how to create strings, combine them, and the built-in PHP function to check length, change upper/lower case, and search for text content. You also learn the importance of cleaning up the text that is displayed to be safe.
Key points
- Strings can be written with single quotes or double quotes
- Operator. Used to combine two or more strings
- Calculate the length of the characters, search for the position of the text
- Use htmlspecialchars() when displaying a string from user input
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.