Preg_replace Rotate PHP Code

Source: Internet
Author: User
Preg_replace replacing PHP code
There is a PHP code, I want to make all the characters between uppercase and lowercase

PHP Code
  
  A = "
  
   ; Echo preg_replace ("/(. *?) <\/a>/es "," "". Strtoupper ("\\1"). "" ', $a);


The result of the output is always incorrect, always take some strings as PHP code execution (such as the output of the result $str lost), how can I output the correct results? Or is there any other way to achieve this?

Thanks, man.

------Solution--------------------
PHP Code
$a = "
  
   ; Echo preg_replace_callback ("/(. *?) <\/a>/s ", ' foo ', $a); function foo ($r) {  
  • 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.