<?php$a = array('aa','bb','cc','dd'); function addRq($sValue) { return 'rq'.$sValue;}$newA = array_map("addRq", $a);var_dump($newA);
Standard input is empty
array(4) { [0]=> string(4) "rqaa" [1]=> string(4) "rqbb" [2]=> string(4) "rqcc" [3]=> string(4) "rqdd" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!