ciao a tutti, ho letto una guida in cui spiega come creare un carrello elettronico. Ho fatto tutte le pagine necessarie per il carrello. Quando vado ad aprire la pagina del negozio, mi esce quest' errore:
Il codice della pagina dove mi da' l'errore e' questa:codice:Warning: Invalid argument supplied for foreach() in C:\wamp\www\mary\catalog_index_page.inc on line 15
Mi sapete dire come mai mi da' quest' errore?codice:<?php /* File: catalog_index_page.inc * Desc: Displays the categories for the catalog. */ ?> <html> <head><title><?php echo $page['title'] ?></title></head> <body> <?php /* Display text before form */ echo "<div style='margin-left: .1in'> <h1 align='center'> {$page['top']}</h1><hr>"; /* Create form containing selection list */ echo "<form action='$_SERVER[PHP_SELF]' method='POST'>\n"; foreach($food_categories as $key => $subarray) { echo "<h3>$key</h3>"; echo "<ul>"; foreach($subarray as $type) { echo "<input type='radio' name='interest' value='$type'>$type \n"; } echo "[/list]"; } echo " <input type='submit' name='Products' value='Select Category'>\n </form>\n"; ?> </div> <hr><font size="-1"><?php echo $page['bottom'] ?> </body></html>


Rispondi quotando
