{"id":640,"date":"2011-02-12T04:24:02","date_gmt":"2011-02-11T19:24:02","guid":{"rendered":"http:\/\/blog.t-szk.com\/?p=640"},"modified":"2011-02-12T04:24:32","modified_gmt":"2011-02-11T19:24:32","slug":"php%e9%85%8d%e5%88%97%e3%81%ab%e6%a0%bc%e7%b4%8d%e3%81%95%e3%82%8c%e3%81%a6%e3%81%84%e3%82%8b%e5%85%a8%e3%81%a6%e3%81%ae%e5%80%a4%e3%82%92%e3%80%81%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9f%e9%96%a2","status":"publish","type":"post","link":"https:\/\/codaholic.org\/?p=640","title":{"rendered":"[PHP]\u914d\u5217\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u5024\u3092\u3001\u6307\u5b9a\u3057\u305f\u95a2\u6570\u306b\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059"},"content":{"rendered":"<p>\u914d\u5217\u306e\u4e2d\u8eab\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u3001\u3042\u308b\u51e6\u7406\u3092\u5b9f\u884c\u3057\u305f\u3044\u6642\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u3088\u3046\u306a\u6642\u306farray_map\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002\u4e0b\u8a18\u306b\u793a\u3059\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u914d\u5217\u306e\u4e2d\u8eab\u5168\u3066\u30922\u500d\u3057\u3066\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>[php]<br \/>\n<?php\n\tfunction hoge($n){\n\t\t$n = $n * 2;\n\t\treturn $n;\n\t}\n\t$arr = array(11,22,33);\n\t$out = array_map('hoge',$arr);\n\tprint_r($out);\n?><br \/>\n[\/php]<\/p>\n<p>array_map\u95a2\u6570\u306f\u7b2c\u4e00\u5f15\u6570\u306b\u5f15\u6570\u3092\u6e21\u3059\u95a2\u6570\u540d\u3092\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u5bfe\u8c61\u3068\u3059\u308b\u914d\u5217\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e0a\u8a18\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001\u914d\u5217arr\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b11\u300122\u300133\u3068\u3044\u30463\u500b\u306e\u6570\u5024\u3092\u305d\u308c\u305e\u308c2\u500d\u3057\u3066\u3001\u914d\u5217$out\u306b\u683c\u7d0d\u3057\u3066\u3044\u307e\u3059\u3002\u7b2c\u4e00\u5f15\u6570\u306b\u306f\u95a2\u6570\u306e\u540d\u524d\u3092\u6e21\u3059\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p><b>\u5b9f\u884c\u7d50\u679c<\/b><br \/>\n[html]<br \/>\nArray ( [0] => 22 [1] => 44 [2] => 66 )<br \/>\n[\/html]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u5217\u306e\u4e2d\u8eab\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u3001\u3042\u308b\u51e6\u7406\u3092\u5b9f\u884c\u3057\u305f\u3044\u6642\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u3088\u3046\u306a\u6642\u306farray_map\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002\u4e0b\u8a18\u306b\u793a\u3059\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u914d\u5217\u306e\u4e2d\u8eab\u5168\u3066\u30922\u500d\u3057\u3066\u51fa\u529b\u3057\u307e\u3059\u3002 [php] [\/php] array [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[4],"tags":[120,244,65],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gd1W-ak","_links":{"self":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/640"}],"collection":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=640"}],"version-history":[{"count":2,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/640\/revisions"}],"predecessor-version":[{"id":642,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/640\/revisions\/642"}],"wp:attachment":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}