CodefyPHP FrameworkCodefyPHP Framework
  • Home
  • Community
    • Forum
    • Github
    • YouTube
  • News
  • Home
  • Community
    • Forum
    • Github
    • YouTube
  • News
home/Knowledge Base/Helpers/sort_element_callback
Popular Search:installation, codex, mail

sort_element_callback

16 views 0

Written by Joshua
August 14, 2024

Description

Sorts a structured array by Name property.

Usage

<?php

use function Qubus\Support\Helpers\sort_element_callback;

sort_element_callback(array $a, array $b): int;

Parameters

$a (array) (required) First item for comparison. The compared items should be associative arrays that optionally include a Name key.

$b (array) (required) Second item for comparison.

Return Value

(bool) Return 0, -1, or 1 based on two string comparison.

Edit on Github

Last Updated on August 14, 2024 by Joshua

Related Articles
  • mail
  • php_where
  • php_like
  • convert_array_to_object
  • compact_unique_array
  • truncate_string

Didn't find your answer? Check out the Forum

Leave A Comment Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  php_where

mail  

  • Copyright 2025 CodefyPHP.com. All Rights Reserved

Popular Search:installation, codex, mail