Home >Backend Development >PHP Tutorial >请问怎么删除价格里面的货币符号

请问怎么删除价格里面的货币符号

WBOY
WBOYOriginal
2016-06-23 13:35:431679browse

请问怎么删除价格里面的货币符号 $¥£


回复讨论(解决方案)

$txt = preg_replace('/$|¥|£/', '', $txt);

$txt = '$¥£123';echo str_replace(array('$','¥','£'),'',$txt);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn