大大求救! ! PHP數組作為查詢資料庫的問題! !
<?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)
將表中查到的資料輸出到表裡面! ! !