To make sure the structure is always sorted by the sort
field, you can use the following code (untested):
usort($publications, function($a, $b) {
return strcmp($a['sort'], $b['sort']);
});
To make sure the structure is always sorted by the sort
field, you can use the following code (untested):
usort($publications, function($a, $b) {
return strcmp($a['sort'], $b['sort']);
});