目前我知道的唯一全局 PHP 命令是:
<?=$text_items?>
这吐了:
1 item(s) - £318.75
我想获得318.75
价值,所以目前我正在尝试替换,但它工作并不顺利:
$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);