Currently the only global PHP command I know is:
<?=$text_items?>
This spits:
1 item(s) - £318.75
I want to get the 318.75 value so at the moment I am trying a replace but it is not working all smoothly:
$short = $text_items;
$short = str_replace("£", "", $short);
$short = str_replace("£", "", $short);
$short = str_replace("-", "", $short);
$short = str_replace("–", "", $short);
$short = str_replace(" ", "", $short);
$short = str_replace("-", "", $short);
$short = str_replace("ITEMS", "", $short);
$short = str_replace("(", "", $short);
$short = str_replace(")", "", $short);
$short = str_replace("item(s)", "", $short);
$short = str_replace("ITEM", "", $short);
html_entity_decodechanges£to£end(explode('£'is giving you string after ‘£‘ characterfloatvalis valuating string to float.E_STRICTerror which occurs to passing constant inend()function.Working example
Second solution is Regexp:
Working example