PHPsubstr_replace () function syntax and parameter _ PHP Tutorial

Source: Internet
Author: User
The syntax and parameters of the PHPsubstr_replace () function. PHPsubstr_replace () function syntax substr_replace (string, replacement, start, length) parameter description string is required. Specifies the string to be checked. Replacement is required. Specifies the PHP substr_replace () function syntax to be inserted.

Substr_replace (string, replacement, start, length)

Parameters Description
String Required. Specifies the string to be checked.
Replacement Required. Specifies the string to be inserted.
Start

Required. Specifies where the string starts replacement.

  • Positive number-inStartOffset start to replace
  • Negative number-the number at the end of the stringStartOffset start to replace
  • 0-START replacement at the first character in the string
Charlist

Optional. Specifies the number of characters to replace.

  • Positive number-length of the string to be replaced
  • Negative number-Number of replaced characters starting from the end of the string
  • 0-insert instead of replace

The http://www.bkjia.com/PHPjc/364579.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/364579.htmlTechArticlePHP substr_replace () function syntax substr_replace (string, replacement, start, length) parameter description string is required. Specifies the string to be checked. Replacement is required. Specifies...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.