📜  php foreach mysql 结果 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.136000             🧑  作者: Mango

代码示例1
$result_select = mysqli_query($cnx,$query_select);
$rows = array();
while($row = mysqli_fetch_array($cnx,$result_select))
    $rows[] = $row;
foreach($rows as $row){ 
    $ename = stripslashes($row['name']);
    $eemail = stripcslashes($row['email']);
    $epost = stripslashes($row['post']);
    $eid = $row['id'];
}