PHP5.3ããã¯ãã¼ã¸ã£ãå©ç¨å¯è½ã§ãããé«éé¢æ°ãç©æ¥µçã«å©ç¨ãã¦ç°¡æ½ãªã³ã¼ããå¿ããããã®ã§ãããä¸åº¦èª¿ã¹ã¦ãããªãã¨æå¤ãªé¢æ°ãå©ç¨å¯è½ã§ãããã¨ã«æ°ã¥ããªãã£ããããã®ã§ã¾ã¨ã(å人çã«ãã使ãé )ã array_map PHP: array_map - Manual é«éé¢æ°ã§æã代表çã¨æããããã®ãmap-reduceã®mapãé åã®åè¦ç´ ãã¯ãã¼ã¸ã£ãç¨ãããããã³ã°ãè¡ããå¥ã®é åãä½ãã¾ãã <?php $prices = [100, 200, 300]; $taxInPrices = array_map(function($price) { return $price * 1.08; }, $prices); var_dump($taxInPrices); // array(3) { // [0]=> float(108) // [1]=> float(216) /
{{#tags}}- {{label}}
{{/tags}}