PHP Tutorial

A web server programming language.

PHP Strings

PHP Strings

A string is a sequence of characters, like "Hello world!".

Common String Functions:

  • strlen() - Return the Length of a String
  • str_word_count() - Count Words in a String
  • strrev() - Reverse a String
  • strpos() - Search For a Text Within a String
  • str_replace() - Replace Text Within a String

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics