I have a bunch of H4 tags like this:
<h4 class="heading--35F23 headingh4--2x5Gb" data-reactid="26">MobilePay</h4>
How do I extract the value "MobilePay"?
Best Crox.
I have a bunch of H4 tags like this:
<h4 class="heading--35F23 headingh4--2x5Gb" data-reactid="26">MobilePay</h4>
How do I extract the value "MobilePay"?
Best Crox.
if you are talking about parsing data from a string, the easiest way to do so is to use a regular expression. In case if you already have your string:
$your_data = '<h4 class="heading--35F23 headingh4--2x5Gb" data-reactid="26">MobilePay</h4>';
preg_match_all('/<h4.*>(.*)<\/h4>/U', $your_data, $matches);
$result = $matches[1];
print_r($result);