|
|
|
รบกวนหน่อยคับ นิดเดียวแล้ว ผมจะ เอา num มาลูป ตรง $rows[] ใน array ทำไงดีคับ |
|
|
|
|
|
|
|
Code (PHP)
$arr=array('1','2','3','4','5','6','7','8','9');
foreach($arr as $V){
echo $TestArray[] = $V.'<br>';
}
print_r($TestArray);
|
|
|
|
|
Date :
2015-01-30 14:00:50 |
By :
bunchuai |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
$fildid =('1,2,3');
foreach($nameArray as $key){
$num = $key-1;
$a .= '$row['.$num.'],';
}
//echo num = 0 1 2
while($row = mysqli_fetch_array($sql,MYSQLI_NUM)) {
$rows[] = array($a);
}
echo json_encode($rows);
ออกแบบนี้อะคับบ
|
|
|
|
|
Date :
2015-01-30 14:53:11 |
By :
charib |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
echo "<pre>";
print_r($TestArray);
|
|
|
|
|
Date :
2015-02-06 09:12:55 |
By :
bunchuai |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|