Trim removes the special symbol $.

Source: Internet
Author: User
Trim removes the special symbol $.
$ Source = "$ http://www.baidu.com/call.scv$"; echo trim ($ source, "$ ");


The purpose is to remove the $ sign before and after $ source.
However, the output is:

: // Www.baidu.com/call.scv

Thank you!


Reply to discussion (solution)

$ Source = '$ http://www.baidu.com/call.scv#'; here it should be a single quotation mark
Echo trim ($ source, '$ ');

$ Source = '$ http://www.baidu.com/call.scv+ ';

Change to single quotes. php will parse $ http in double quotes

Error_reporting (E_ALL ^ E_NOTICE); $ source = "$ http://www.baidu.com/call.scv$"; echo $ source;
Because the variable $ http does not exist, http does not exist at the beginning.
In this way
$ Source = '$ http://www.baidu.com/call.scv?'{echo trim ($ source, "$ ");

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.