- mt_rand: documentation ( source)
- print_r: documentation ( source)
- arsort: documentation ( source)
- range: documentation ( source)
<?php
/**
* Created by PhpStorm.
* User: efik
* Date: 21.09.15
* Time: 13:28
*/
$podcasts = [];
foreach (range(1, 150) as $index) {
$podcasts[] =
[
"id" => $index * mt_rand(1, 4),
"title" => "Song - " . $index,
"time" => $index,
"License" => "MIT",
];
}
arsort($podcasts);
print_r( $podcasts);