Hi,

I want to run the following script:

$my_array_1 = array(4, 7, 9);
$my_array_2 = array(4, 7, 9);

while ($my_array != array(-1, -1, -1) OR $my_array_2 != array(-1, -1, -1)) {

$fixture_1 = $my_array_1[rand(0, 2)];
$fixture_2 = $my_array_2[rand(0, 2)];

echo "fixture 1 = ".$fixture_1."<br>";
echo "fixture 2 = ".$fixture_2."<br><br>";

echo "my array 1-0 = ".$my_array[0]."<br>";
echo "my array 1-1 = ".$my_array[1]."<br>";
echo "my array 1-2 = ".$my_array[2]."<br><br>";

echo "my array 2-0 = ".$my_array_2[0]."<br>";
echo "my array 2-1 = ".$my_array_2[1]."<br>";
echo "my array 2-2 = ".$my_array_2[2]."<br><br><br>";
echo "-----------------------------------------<br><br>";

if ($fixture_1 == 1) {
$my_array[0] = -1;
}
if ($fixture_1 == 10) {
$my_array[1] = -1;
}
if ($fixture_1 == 15) {
$my_array[2] = -1;
}

if ($fixture_2 == 1) {
$my_array_2[0] = -1;
}
if ($fixture_2 == 10) {
$my_array_2[1] = -1;
}
if ($fixture_2 == 15) {
$my_array_2[2] = -1;
}

but instead of the value i have in the array i want to populate this from values i have stored in a mysql database.

Ive tried using this select query

$sql = "SELECT user_id
FROM my_table
WHERE field1 = 62
";
$results = mysql_query($sql)
or die(mysql_error());

while($rows = mysql_fetch_array($results)) {
}

but dont know how to get those values into my array.

Im well confused with it all now so i might be missing something basic here. Anyone know what i should be doing?

Thanks