Sort an array by a particular field - OnLoad Custom Code

momentis 24 Feb, 2012
I am currently using the following to pull data from a table in my database (used in a Custom Code item in an OnLoad event):

<?php
foreach($form->data['UserDetails'] as $detail):
?>


One of the fields returned in the array is 'acct_name'. How can I have the array sorted, by default, by this field? I don't need to make the column sortable by the end user, but I would like the data presented in alpha order.
GreyHead 25 Feb, 2012
Hi Rick,

Try using the 'Order Files' box on the Data Displayer tab of the DB Multi Record Loader action.

Bob
This topic is locked and no more replies can be posted.