This is an array,
total = [\"10%\", 1000, \"5%\", 2000] . how can i filter these into two array like, percentage = [\"10%\",\"5%\"] and absolute = [100
total = [\"10%\", 1000, \"5%\", 2000]
use this code
$array = array('10%', '1000', '20%','2000');
//for show integer from array
print_r(array_filter($array, function ($var) { return (stripos($var, '%') === false); }));
//for show % array
print_r(array_filter($array, function ($var) { return (stripos($var, '%') == true); }));