Forked from vrushank-snippets/Get the text between $start and $end
Created
March 14, 2020 09:38
-
-
Save raihan-uddin/1da6059491e61f458c0dad30aeedaa4e to your computer and use it in GitHub Desktop.
PHP : Get the text between $start and $end
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
function GetBetween($content,$start,$end){ | |
$r = explode($start, $content); | |
if (isset($r[1])){ | |
$r = explode($end, $r[1]); | |
return $r[0]; | |
} | |
return ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment