你可以在循环体内建立一个新的数组如
$arr[$i]=$row[ "name"]
$i++
$i在循环体前声明等于0
然后你在循环体后把数组放在session里面
这是一种思路,不能达到你要的就继续问我
"{$ye_x}{$row['name']}"
jquery:
$(function(){
$('a.need').click(function(){
var _name = $(this).attr('data-name');
$.post('url',{name:_name },function(e){
console.log(e);
},'JSON');
});
});