eval();
$b = 2;
$c = "+";
$d = 3;
eval("\$a=$b$c$d;"); //字符串相加,取值 (加减乘除都行)


str_replace();
str_replace('%','',$ont); //替换掉%,速度比正则快多了


preg_replace()//执行一个正则表达式的搜索和替换
$project['amount'] = preg_replace('/[^\d\.]/','',$project['amount']);// 只取出数字出来
strip_tags//从字符串中去除 HTML 和 PHP 标记
strip_tags($text);








 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-08-25
  • 2021-12-24
猜你喜欢
  • 2022-03-06
  • 2022-03-05
  • 2022-02-07
  • 2022-12-23
  • 2021-04-27
  • 2021-09-19
相关资源
相似解决方案