hi there, i have a problem with this one, i want to input the data to an array, however, this doesn't work for me.
$resultSN = mysql_query("SELECT * FROM table ");
$resultRowsSN_Count = mysql_query("SELECT COUNT(*) FROM table");
$count = mysql_result($resultRowsSN_Count,0,0);
while($row = mysql_fetch_array($resultSN))
{
$machineName_O = $row['MachineName'];
for ($i=0; $i<$count; $i++)
{
$machineName[$i] = $machineName_O;
echo $i. " " . $machineName[$i] . "<br>";
}
}
with the code above, it displays like this..example
$count = 3
$machineName = a, b, c
$i = 0 - 2
0 a
1 a
2 a
0 b
1 b
2 b
0 c
1 c
2 c
what i want to get is something like this:
$machineName[0] = a
$machineName[1] = b
$machineName[2] = c
could you help me please, i'm stock with this one..thanks in advance ^_^