简单教程
提交运行
代码编辑器:
<?php $str = "age:30 weight:60kg"; sscanf($str,"age:%d weight:%dkg",$age,$weight); var_dump($age,$weight);
运行结果: