Assign null as the function name in array_map in PHP

Description

The following code shows how to assign null as the function name in array_map.

Example


/*w  w  w  .ja  v a  2s  . c om*/
<?php
    $a1=array("Red","Data");
    $a2=array("CSS","HTML");
    print_r(array_map(null,$a1,$a2));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone