Created
January 13, 2013 21:59
-
-
Save crishnakh/4526417 to your computer and use it in GitHub Desktop.
"This allows you to get contents of any div with ID tag. $matches[0] returns with parent div tag $matches[1] returns with out parent div tag" from http://snipplr.com/view/15302/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
preg_match('/\<div id\=[\"]{0,1}ad_content[\"]{0,1}\>(.*?)\<\/div\>/s', $content['content_body'], $matches); | |
$content['content_body'] = $matches[1]; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment