%在sprintf函数中是特殊函数 但是有时候我们需要输出% 如何把%原样输出
我们可以在输出字符串中使用%对%进行处理, 如下:
<?php
$good_library_chance = '精品库刷出概率:%s%%;'
$display_str = sprintf(trans('admin::lang.good_library_chance'), 50);
echo $display_str;
%在sprintf函数中是特殊函数 但是有时候我们需要输出% 如何把%原样输出
我们可以在输出字符串中使用%对%进行处理, 如下:
<?php
$good_library_chance = '精品库刷出概率:%s%%;'
$display_str = sprintf(trans('admin::lang.good_library_chance'), 50);
echo $display_str;