Home > Backend Development > PHP Tutorial > php的字串符 1/4,如何得出结果

php的字串符 1/4,如何得出结果

WBOY
Release: 2016-06-06 20:45:51
Original
1021 people have browsed it

抓取的api中有一个(string)1/4

我需要得出结果,请问我要怎么写php

回复内容:

抓取的api中有一个(string)1/4

我需要得出结果,请问我要怎么写php

来个暴力点的

<code class="lang-php"><?php $output = '1/4';
$output = exec('echo 1|awk \'{print '.$output.';}\'');
echo $output;
</code></code>
Copy after login

api是否有规定格式?

Related labels:
php
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