Created
April 17, 2017 05:41
-
-
Save chihirokaasan/9aece0810d4e3da9f5a3f90721cecccf to your computer and use it in GitHub Desktop.
sprintfとstr_replaceの合わせ技で半角スペース埋め
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//結果 ’ 12’ | |
echo str_replace(" ", " ", sprintf("%3d", 12)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment