This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

986 points
C4e244af1949504291ed5d5f73c4c64a?s=140&d=retro
Submitted by
charlyvos
almost 3 years ago

Please halp guyz 8/8

<?php
$dingen = array();
arraypush($dingen, "Choem");
array
push($dingen, "Stoon");
arraypush($dingen, "kokosnoot");
array
push($dingen, "dikhoofd");
arraypush($dingen, "aids");
array
push($dingen, "jesseisgay");
arraypush($dingen, "lekker");
array
push($dingen, "noten");

$count = count($dingen);

$sort = sort($dingen) -1;

$rand = rand($sort, $count);

$winner = $dingen [$rand];

$thewinner = strtoupper("$winner");

print $thewinner;
?>

Why won't this code work?


2 votes

permalink

Ad at the end.

210 points
Picture
Submitted by
Adam Azani
almost 3 years ago


2 votes

permalink

you should the arraypush like this array_push otherwise your remaining code is right...

1378 points
54b8c04e76b8fe7e14004961_874217388
Submitted by
Varad Mayee
over 2 years ago