I would like to remove everything but the amount as a float from this string:
<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">₪</span>700.00</span>
I tried:
strip_tags( $total_price_paid );- Not enough.strip_tags( html_entity_decode( $total_price_paid ) );- it decodes the entity into a symbol, i tried preg_replace after and it didn't work.preg_replace( '/[^0-9]/', '', $value );- Doesn't get rid of html entity
None of those achieved a result of 700.00 formatted as a float.
Can anyone help please?
Thanks!