Skip to content

Instantly share code, notes, and snippets.

@ifirmawan
Created July 20, 2018 01:57
Show Gist options
  • Save ifirmawan/85febc8b8cba5f815e82c99cebb4f7d7 to your computer and use it in GitHub Desktop.
Save ifirmawan/85febc8b8cba5f815e82c99cebb4f7d7 to your computer and use it in GitHub Desktop.
Preg match text in php between html tags
<?php
preg_match("'<p class=\"review\">(.*?)</p>'si", $source, $match);
if($match) echo "result=".$match[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment