<?php
$dopage->GetPage("SELECT * FROM `#@__unameym` WHERE uname='$c_uname' ORDER BY id DESC");
if($dosql->GetTotalRow() > 0)
?>
<?php
$row3=[];
while($row = $dosql->GetArray())
{
$row3 =array( $row['ypname']);
$row5 = array(end($row3));
?>
<?php
var_dump ($row5);
//输出为
array(1) { [0]=> string(4) "a凯" } array(1) { [0]=> string(12) "不老咸蛋" } array(1) { [0]=> string(11) "维生素B2" } array(1) { [0]=> string(9) "维生素" } array(1) { [0]=> string(9) "小菜胡" } ,但是怎么将$row5中的元素挨个的循环查询?
}
?>
<?php
$dopage->GetPage("SELECT * FROM `#@__liuxiang` WHERE ypname='end($row5)' ORDER BY id DESC",20);
if($dosql->GetTotalRow() > 0)
将表中查到的数据输出到表里面!!!
foreach 可以这样写
foreach($row5 as $vo){
echo $vo;
}
用for 循环,通过下标的方法,获取每个值,i=0;i<count($row);i++,依次循环查询然后合并到一个数组。