php - How to build a multilevel menu from associative array. -
please, need on one. want build multilevel menu, want iterate through associative array foreach loop inside smarty template. first, have mysql output:
now try associative array it, tried fetchall(pdo::fetch_assoc)
, because column names same, gives me values right column:
array ( [0] => array ( [id] => 7 [name] => beta 1-3 glucan ) [1] => array ( [id] => 8 [name] => okinawa fucoidan )
please if have ideas how process table multidimentional menu, let me know.
thank you.
either use fetch_num or create aliases in query.
Comments
Post a Comment