Hyvor Developer
  Home   Download   Copy
Code
<?php
$array1 = [24, 12, 45, 23];
$array2 = array_map(function($val) {
	return $val * 2;
}, $array1);
var_dump($array2);
Result