Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,我有一个编号系统,可以带回以下内容:
使用:
<?php echo $slide->counter; ?>
01 02 03 04 05
我可以在上面的 php 中添加什么来摆脱零,使其显示:
1 2 3 4 5
这应该工作...
printf('%d', $slide->counter);
<?php echo (int)$slider->counter; ?>