I've been searching all over for how to do this. I read the online docs from php.net and they are kinda tough to understand. Here's a sample of what my code kinda looks like:
Code: Select all
<?php
$array1 = array();
while($myrow = mysql_fetch_array($result))
{
$array2 = array(
"num1" => myrow['num1'],
"num2" => myrow['num2'],
"num3" => myrow['num3'],
"num4" => myrow['num4']
);
$array1[$i] = $array2;
$i++;
}
?>Code: Select all
Array1ї0] is 1, 2, 5, 0
Array1ї1] is 1, 2, 4, 0
Array1ї2] is 1, 2, 3, 0
Array1ї3] is 1, 2, 2, 0