Let’s assume that one had a string variable something like:
$content = “garbage garbage garbage garbage <!-- MARKER –> gold gold gold gold <!-- / MARKER –> garbage garbage garbage garbage”;
What would be the best way to be able to create a variable called $gold that contains only the “gold gold gold gold” content as marked by the opening and closing of the <!-- MARKER –> tag?
I’m having issues getting this small filtering task accomplished, any help would be much appreciated.
Thanks.