Build a bootstrap drop-down multi-level menu from a PHP array
问题 I'm trying to make a bootstrap drop-down menu from an array in PHP. I have written a recursive menu function, but I am struggling with adding the custom html attributes required for bootstrap. My menu array is in the following format: $menu = array( 'calendar' => array( 'text' => 'Calendar', 'rights' => 'user' ), 'customers' => array( 'text' => 'Customers', 'rights' => 'user', 'sub' => array( 'create-new' => array( 'text' => 'Create new customer', 'rights' => 'user' ), 'show-customers' =>