array_map Perform Function on Each Item of an Array

array_map() takes two arguments. The first argument is the function to perform on the second argument (which is an array). Returns a new ar...

array_map() takes two arguments. The first argument is the function to perform on the second argument (which is an array). Returns a new array.
$original = array('

Paragraph

', 'Bold');
$new = array_map('strip_tags', $original);

// $new is now array('Paragraph', 'Bold');

Hot in Week

Popular

Archive

item