PHP substr_replace () function syntax and parameters _php Tutorial

Source: Internet
Author: User
PHP substr_replace () function syntax

Substr_replace (String,replacement,start,length)

Parameters Description
String Necessary. Specifies the string to check.
Replacement Necessary. Specifies the string to insert.
Start

Necessary. Specifies where the string begins to be replaced.

  • Positive number-starts with the first offset
  • Negative number-replaces the start offset starting at the end of a string
  • 0-Start the substitution at the first character in the string
Charlist

Optional. Specifies the number of characters to replace.

  • Positive number-The length of the string being replaced
  • Negative-the number of characters to be replaced starting at the end of the string
  • 0-Insert rather than replace

http://www.bkjia.com/PHPjc/364579.html www.bkjia.com true http://www.bkjia.com/PHPjc/364579.html techarticle The PHP substr_replace () function Syntax Substr_replace (string,replacement,start,length) parameter describes the string required. Specifies the string to check. Replacement required. Rule to insert ...

  • 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.