Jump to content
php.lv forumi

Neattēlo pareizi


kalabox

Recommended Posts

Sveiki, tātad ir tāda fīča, man uzģenerē 4 skaitļus no 9, katrs ir atsevišķa gif ikona.

Bet izvada man vienu zem otra., Kā dabūt lai rāda blakus vienu otrai? ?

srand ((float) microtime() * 10000000);
$buttons = array ("1", "2", "3", "4", "5", "6", "7", "8", "9");
$rand_keys = array_rand ($buttons, 4);


$key = $buttons[$rand_keys[$key]];

for($x=0; $x<4; $x++) {
$buttonlist.="<a href=\"#\" onclick=\"next($x)\" id=\"button$x\"><img src=\"clickimages/".$buttons[$rand_keys[$x]].".gif\" border=0></a>";
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...