Top "Array-map" questions

PHP's array_map() function accepts Callback function to run for each element in each array and an array to run through the callback function.

Array Map a PHP Multidimensional Array

Have a multidimensional array $template=Array ( [0] => Array ( [id] => 352 [name] => a ) [1] => Array ( [id] => 438 [name] => b ) [2] =&…

php arrays multidimensional-array array-map
array_map and append string to elements of an array

I have an array like this: $a = array('aa', 'bb', 'cc', 'dd'); I want to add the 'rq' string at …

php arrays array-map
Array_Map using multiple native callbacks?

I want to run 3 native functions on the same array: trim, strtoupper and mysql_real_escape_string. Can this be …

php arrays callback array-map
php - array map using public function callback within class

class something{ public function add_val( $val ){ $array = array(); foreach( $val as $value ) { $array[] = static::$post[${$value}]; } return $array; } pulblic …

php class methods array-map
mysql_real_escape_string and array_map returns blank strings?

I haven't yet learned how to use parameterized queries (which according to some other posts on this site is something …

php mysql array-map
Alternatives to Pass both Key and Value By Reference:

Can someone explain to me why you can't pass a key as reference? Ex: if(is_array($where)){ foreach($where …

php arrays recursion foreach array-map