Skip to content

Instantly share code, notes, and snippets.

💭
SYRIA <3

MAZEN Kenjrawi MAZEN-Kenjrawi

💭
SYRIA <3
Block or report user

Report or block MAZEN-Kenjrawi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MAZEN-Kenjrawi
MAZEN-Kenjrawi / docker-help.md
Created Mar 2, 2019 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips
View docker-help.md

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@MAZEN-Kenjrawi
MAZEN-Kenjrawi / strnatcmp_multidimensional_arrays.php
Created Jul 2, 2018
Sorting multidimensional arrays using "natural ordering" algorithm
View strnatcmp_multidimensional_arrays.php
<?php
if (!function_exists('sort_by_strnatcmp')) {
function sort_by_strnatcmp($key, $order)
{
return function ($a, $b) use ($key, $order) {
if (is_numeric($a[$key]) && is_numeric($b[$key])) { // Both Numeric Values
return ($order === 'ASC') ? ($a[$key] >= $b[$key]) : ($a[$key] < $b[$key]);
}
// One of them at least is string
return
You can’t perform that action at this time.