PHP String Functions



PHP Tutorial > String Functions

PHP string functions are used to manipulate string data. The most common string functions include the following:

  • PHP addslashes Function: Adds slashes to specified characters in a string.
  • PHP echo: Outputs one or more strings.
  • PHP explode: Splits a string into multiple strings based on the specified delimiter.
  • PHP htmlentities: Converts characters into corresponding HTML entities
  • PHP htmlspecialchars: Converts 5 characters into corresponding HTML entities.
  • PHP implode: Joins array elements with a specified delimiter.
  • PHP md5: Calculates the md5 hash of a string.
  • PHP number_format: Sets the format of a numerical output.
  • PHP print: Outputs one or more strings.
  • PHP str_replace: Changes certain occurrances on a string with a replacement string.
  • PHP strlen: Returns the length of a string.
  • PHP strpos: Finds the position of the first match in a string.
  • PHP strstr: Returns all characters of a string after the first match.
  • PHP substr: Retrieves a portion of the string.
  • PHP trim: Strips out white spaces at both ends of a string.

    Next: PHP addslashes Function

    Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.



    
    More 1Keydata Tutorials



  • PHP addslashes
    PHP echo
    PHP explode
    PHP htmlentities
    PHP htmlspecialchars
    PHP implode
    PHP md5
    PHP number_format
    PHP print
    PHP str_replace
    PHP strlen
    PHP strpos
    PHP strstr
    PHP substr
    PHP trim

    PHP Syntax

    PHP Sitemap

    PHP Resources