{"id":1495,"date":"2010-11-19T17:50:38","date_gmt":"2010-11-19T08:50:38","guid":{"rendered":"http:\/\/www.itblog.jp\/?p=1495"},"modified":"2010-11-19T17:51:30","modified_gmt":"2010-11-19T08:51:30","slug":"php%e3%81%a7%e6%a1%81%e6%95%b0%e3%82%92%e5%9f%8b%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=1495","title":{"rendered":"PHP\u3067\u6841\u6570\u3092\u57cb\u3081\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>PHP\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u6841\u6570\u30920\u3067\u57cb\u3081\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u4f8b\u3048\u3070\u30012\u309202\u3068\u3057\u305f\u308a\u3059\u308b\u65b9\u6cd5\u3067\u3059\u306d\u3002<br \/>\n\uff08\u751f\u5e74\u6708\u65e5\u306e\u6587\u5b57\u5217\u3092\u51fa\u529b\u3059\u308b\u3068\u304d\u300112\/6\u65e5\u30921206\u3068\u3057\u305f\u304b\u3063\u305f\u308a\u3068\u304b\uff09<\/p>\n<p>\u8272\u3005\u3068\u63a2\u3057\u3066\u3044\u308b\u3068\u898b\u3064\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<blockquote><p>\n\u4f8b\uff09<br \/>\n$string = 5;<br \/>\n$string = str_pad($string, 5, &#8220;0&#8221;, STR_PAD_LEFT);<br \/>\necho $string;<\/p>\n<p>\u51fa\u529b\u7d50\u679c<br \/>\n00005\n<\/p><\/blockquote>\n<p>\u4e0b\u8a18\u306e\u7d50\u679c\u3067\u3082\u51fa\u529b\u3067\u304d\u307e\u3059\u3002<\/p>\n<blockquote><p>$str = &#8220;5&#8221;;<br \/>\n$str = sprintf(&#8220;%05d&#8221;, $str);<br \/>\nprint $str <\/p>\n<p>\u51fa\u529b\u7d50\u679c<br \/>\n00005<\/p><\/blockquote>\n<p>\u4e0b\u8a18\u30b5\u30a4\u30c8\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/d.hatena.ne.jp\/naohide_a\/20080224\/1203866206\" target=\"_blank\">\u5fc5\u8981\u6841\u6570\u307e\u30670\u57cb\u3081\u3059\u308b\/\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u596e\u95d8\u8a18<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u6841\u6570\u30920\u3067\u57cb\u3081\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u4f8b\u3048\u3070\u30012\u309202\u3068\u3057\u305f\u308a\u3059\u308b\u65b9\u6cd5\u3067\u3059\u306d\u3002 \uff08\u751f\u5e74\u6708\u65e5\u306e\u6587\u5b57\u5217\u3092\u51fa\u529b\u3059\u308b\u3068\u304d\u300112\/6\u65e5\u30921206\u3068\u3057\u305f\u304b\u3063\u305f\u308a\u3068\u304b\uff09 \u8272\u3005\u3068\u63a2\u3057\u3066\u3044\u308b\u3068\u898b\u3064\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1495","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/1495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1495"}],"version-history":[{"count":2,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/1495\/revisions"}],"predecessor-version":[{"id":1497,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/1495\/revisions\/1497"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}