<?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);
##//The output is
array(1) { [0]=> string(4) "a凯" } array(1) { [0]=> string(12) "不老 salty egg" } array (1) { [0]=> string(11) "vitamin B2" } array(1) { [0]=> string(9) "vitamin" } array(1) { [0]=> string (9) "Xiaocaihu" } , but how to loop through the elements in $row5 one by one?
}
?>
<?php
$dopage->GetPage("SELECT * FROM `#@__liuxiang` WHERE ypname='end($ row5)' ORDER BY id DESC",20);
if($dosql->GetTotalRow() > 0)
Output the data found in the table to the table! ! !
foreach can be written like this
foreach($row5 as $vo){
echo $vo;
}
Use a for loop to obtain each value through the subscript method, i=0;i<count($row);i++, then loop through the query and merge it into an array.