// Select all entries from the menu table // Create a multidimensional array to conatin a list of items and parents ); // Builds the array lists with data from the menu table { // Creates entry into items array with current menu item id ie. $menu['items'][1] $menu['items'][$items['id']] = $items; // Creates entry into parents array. Parents array contains a list of all items with children $menu['parents'][$items['parent']][] = $items['id']; }
Jest taki skrypt, i nie rozumiem jak buduje się ta tablica menu, a konkretnie.
$menu['items'][$items['id']]= $items to znaczy, że np $menu['items'][1] jest równe czemu? nazwie np samochody?
i
$menu['parents'][$items['parent']][] = $items['id'] dlaczego w tym $menu jest dodatkowe [] na końcu? i to się równa jakiejś liczbie tak?
Proszę o to aby ktos mi to wyjaśnił