<?PHP
include("connect.php");
$sql="select * from user WHERE active = 1";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)){
$arr[]=array($row['ID_member']);
}
print_r($arr);
?>
include("connect.php");
$sql="select * from user WHERE active = 1";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)){
echo $row["id_member"];
}
<?PHP
include("connect.php");
$sql="select * from user WHERE active = 1";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)){
$arr[] = $row['ID_member'];
}
print_r($arr);
?>
แบบที่ 2 Code (PHP)
<?PHP
include("connect.php");
$sql="select * from user WHERE active = 1";
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
print_r($row);
?>
<?PHP
include("connect.php");
$sql="select * from user WHERE active = 1";
$res=mysql_query($sql);
$arr=array();
while($row=mysql_fetch_array($res)){
array_push($arr,$row['ID_member']);
}
print_r($arr);
?>