<?php
echo '<div class="content_banner3">';
echo '<ul>';
foreach($user as $key=>$value){
echo '<li>';
echo '<div class="content_banner4_img">';
echo "<img src='".$value['img']. "' />";
echo '</div>';
echo '<div class="content_banner4_con">';
echo '<span class="tit">'. $value['name'].'</span>';
echo '<span class="pic">'.$value['pice'].'</span>';
$user = array(0=>"out of stock", 1=>"in stock");
$uu = $value["stock"];
echo '<span class="con" >'.$user[$uu].'</span>';
echo '<span class="introduce_2">'.$value['content'].'</span>';
$a = $value['id'];
echo "<a class='introduce_3' href='shop_list.php?id=$value[$a]' >buy</a>";
echo '</div>';
echo '</li>';
}
echo '</ul>';
echo '<div>';
?>
我是想echo "<a class='introduce_3' href='shop_list.php?id=$value[$a]' >buy</a>"; Hinweis: Undefinierter Offset: 1, Hinweis: Undefinierter Offset: 2写法是啥呢
已经搞定
可以通过ajax