Beispiel #1
0
 function CreateFoodTables($types)
 {
     $foodModel = new FoodModel();
     $foodArray = $foodModel->GetFoodByType($types);
     $result = "";
     foreach ($foodArray as $key => $food) {
         $result = $result . "<table class = 'foodTable'>\n                        <tr>\n                            <th rowspan='6' width = '150px' ><img runat = 'server' src = '{$food->FoodImg}' /></th>\n                            \n                            \n                            <th width = '75px' >FoodId : </th>\n                            <td>{$food->FoodId}</td>\n                        </tr>\n                          \n                        <tr>\n                            <th width = '75px' >Name : </th>\n                            <td>{$food->FoodName}</td>\n                        </tr>\n                        \n                        <tr>\n                            <th>Type : </th>\n                            <td>{$food->FoodType}</td>\n                        </tr>\n                        \n                        <tr>\n                            <th>Price : </th>\n                            <td>{$food->Price}</td>\n                        </tr>\n                        \n                    \n                        \n                                         \n                     </table>";
     }
     return $result;
 }