请问php有没有将字符串当做公式处理数据的功能?

WBOY
Release: 2016-06-23 13:43:11
Original
682 people have browsed it

不如$a=100;
$b="$c=$a-20";
怎样处理一下就可以得到80?


回复讨论(解决方案)

$a=100;eval("\$b=\$c=$a-20;");echo $b; //80
Copy after login

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template