<?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>"; 获取出id传到shop_list.php这个页面收到他的id,但是现在报错,Notice: Undefined offset: 1 ,Notice: Undefined offset: 2这些,值也没有传成功,具体写法是啥呢
Already done
Can be passed ajax