array_rand() problem
15.01.2007. u 13:38 · pre 240 meseci
#1
pozz, imam:
recimo da hocu da mi ispise samo 5 ovih imenaprezimena ..
zasto ne radi? ispise mi sve ...
Code:
$igraci = "SELECT * FROM igraci_dodjela";
$nextt = mysql_query($igraci);
while($b=mysql_fetch_array($nextt)){
$imeprezime[] = $b["ime_prezime"];
$id_igraca = $b["id"];
}
$rand = array_rand($imeprezime, 5);
$smarty->assign('imeprezime', $imeprezime);
$igraci = "SELECT * FROM igraci_dodjela";
$nextt = mysql_query($igraci);
while($b=mysql_fetch_array($nextt)){
$imeprezime[] = $b["ime_prezime"];
$id_igraca = $b["id"];
}
$rand = array_rand($imeprezime, 5);
$smarty->assign('imeprezime', $imeprezime);
recimo da hocu da mi ispise samo 5 ovih imenaprezimena ..
zasto ne radi? ispise mi sve ...