Php carriage return and space character replacement function _ PHP Tutorial

Source: Internet
Author: User
Php carriage return and space replacement functions. This article introduces some special character replacement in php Development. if you need it, you can take a look. Function name: ReplaceSpacialChar ($ C_char) function: special character replacement function parameter This article introduces some special character replacement in php Development. if you need it, you can check it out.

// Function name: ReplaceSpacialChar ($ C_char)

// For usage: special character replacement function

// Parameter: $ C_char (string to be replaced)

// Return value: string

// Standby note: This function has a problem and needs to be tested before it can be used.

// Configure //-----------------------------------------------------------------------------------

The code is as follows:


Function ReplaceSpecialChar ($ C_char)

{

$ C_char = HTMLSpecialChars ($ C_char); // Convert Special characters into HTML format.

$ C_char = nl2br ($ C_char); // replace the carriage return

$ C_char = str_replace ("", "", $ C_char); // replace the space

Return $ C_char;

}

Bytes. // Function name: ReplaceSpacialChar ($ C_char) // used for special characters to replace functions // parameters...

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.