Hi!

I am trying to get out a value of an array that I have made from a query and
deliver the value into a variable. I have made this code. Am I totally lost?


while ($myrow = mysql_fetch_array($result));
{

 $id = $myrow['id'];

 $deltaker[] = array ($id);

}

$limit = count($deltaker);


$finn_vinner = rand(0,$limit);

$vinner_deltaker = $deltaker[$finn_vinner];

$vinner_id = current($vinner_deltaker);


$sql2 = "SELECT * FROM konkuranse WHERE id = '$vinner_id'";


Best regards Raymond



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to