I have an array with the fields/path to a value i want to use (for usort). Below you can find how i can get the value hardcoded. I Just can not figure out how to create this programatically. The count of the $arrOrderBy is variable. So i probably have to use a foreach?
This is my order by array:
$arrOrderBy = array(
0 => 'GameObject',
1 => 'Question',
2 => '0',
3 => 'title'
)
This value:
$a[$arrOrderBy[0]][$arrOrderBy[1]][$arrOrderBy[2]][$arrOrderBy[3]];
Has to result to:
$a['GameObject']['Question'][0]['title']
Regards,
$array[0]is not the same as$array['0'].