PHP errors -> Warning: mysqli_stmt::execute(): Couldn't fetch mysqli_stmt | Warning: mysqli_stmt::close()
I don't think it will work this way. When you close the statement (e.g. $menu_stmt->close();
) you also deallocate the statement handle. So the second time through the loop you don't have the prepared statements available to work with anymore.
Try closing the statements after the loop has finished executing.