<?php
function itemList(){
$items= array(
"skateboard" => array(
"name" => "Skateboard"
"type" => "drawings"
"namestripped" => "skateboard"
),
"looklocal" => array(
"name" => "Look Local"
"type" => "graphic-design"
"namestripped" => "looklocal"
),
);
reset($items);
while (list(, $value) = each($items)) {
echo '<li class="item '. $value["type"] .'">';
echo '<a class="fancybox" rel="group" href="images/portfolio/' . $value["type"] . '/'. $value["namestripped"] . '_l.jpg">';
echo '<img src="images/portfolio/' . $value["type"] . '/'. $value["namestripped"] . '.jpg" alt="' . $value . '"/>';
echo '<h3>' . $value["name"] . '</h3>'; echo '</a>';
echo '</li>';
}
}
?>
我把语法搞砸了多严重?当我尝试此代码时,它不会输出任何内容,甚至不会输出 HTML。