PHP code example of hypejunction / user_sort

1. Go to this page and download the library: Download hypejunction/user_sort 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/ */

    

hypejunction / user_sort example snippets



// display a sortable list of friends
$options = array(
	'relationship' => 'friend',
	'relationship_guid' => $user->guid,
);

echo elgg_view('lists/users', array(
	'options' => $options,
	'callback' => 'elgg_list_entities_from_relationship',
));