Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Merge two arrays and sort them as numbers, in descending order:
SUBMITTED BY:
henry1874w
DATE:
June 25, 2017, 2:32 p.m.
FORMAT:
Text only
SIZE:
153 Bytes
Raw
Download
Tweet
HITS:
278
Go to comments
Report
<?php
$a1=array(1,30,15,7,25);
$a2=array(4,30,20,41,66);
$num=array_merge($a1,$a2);
array_multisort($num,SORT_DESC,SORT_NUMERIC);
print_r($num);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus