配列 $point_arr (以下に示すように) があるので、user_id = 3 の配列行を取り出します。
コードは次のとおりです:
//配列
$point_arr = array(
array("id"=>1,"id"=>1,"point"=>2) ,
array("id"=>2,"id"=>3,"point"=>2),
array("id"=>3,"id"=>3,"point "= >2),
array("id"=>4,"id"=>3,"point"=>2),
);
for($i = 0;$i 。
$ new [] = $ point_arr [$ i];
$ new [] = $ point_arr [$ i]; For ($ i = 0; $ i & lt; sizeof ($ i); $ i) {
Print_r ($ new [$ i])
echo "& lt; br /& gt;
http://www.bkjia.com/PHPjc/478845.html
www.bkjia.com
true