<?php header('content-type:text/html;charset=utf-8'); $num = 5; $location = '树上'; $format = '有%d只猴子在%s';//'有%f只猴子在%s'输出为5.0000000 printf($format,$num,$location); //echo sprintf($format,$num,$location); //echo $str; //printf有输出,sprintf没有输出,但可以返回结果
print和sprint的区别
最新推荐文章于 2021-11-12 11:24:45 发布