Avenir | Drupal Development | Joomla Development | Magento Development | OsCommerce Development
Showing posts with label preg_replace. Show all posts
Showing posts with label preg_replace. Show all posts

Wednesday, 22 February 2012

How to remove the PHP tag using preg_replace


$str= 'hi radha x,annnnnnn.......<? "pri";?> <?="pri";?> hi jo <?php ehco 'TEXT';?> Hi raja' ;

$removedPhpWrap10=preg_replace(array('#<\?(?:php)?(.*?)\?>#s'), array(''), $str);