I have an algorithm that users can manually enter and it will display the header and footer. Although in my function there is a priority field, and I want everything to be sorted with priority.
3 Parameters - Field, Priority, Type Keep in mind I already have a array of head/foot with priority preset, this function is to add additional or overwrite the priority. It then gets stored in another array to simplify. I then want to sort it all with the priority.
Array looks like this:
'js-amcharts-export' => array('link' => 'assets/global/plugins/amcharts/amcharts/plugins/export/export.min.js',
'type' => 'text/javascript',
'default' => false,
'priority' => ''),
Example:
$script->require_meta('js-amcharts-export', '20')
This would make sure all the other ones with priority 10 lets say get loaded first then the 20, and everything after.
Basically I need to sort the array based on 'priority'
Would asort($header_array['priority']
work?