PHP code example of carry0987 / utils
1. Go to this page and download the library: Download carry0987/utils library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
carry0987 / utils example snippets
use carry0987\Utils\Utils;
$array = [
['id' => 3, 'name' => 'Alice'],
['id' => 1, 'name' => 'Charlie'],
['id' => 2, 'name' => 'Bob'],
];
$sortedArray = Utils::sortData($array, 'ASC', 'id');
print_r($sortedArray);