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

Arrays Forum

View Course » View Exercise

662 points
594a6c6083696696bf0001f2_394538649
Submitted by
Shivagni Rajput
about 2 years ago

bug found in the site! its not working!!!!!

Accessing Elements



<?php
$tens = array(10, 20, 30, 40, 50);
echo $tens[2];
?>

why is not working?? when i press submit button.. it just keeps revolving for hours.!


1 vote

permalink

Maybe Try Reloading By That Might Not Work...

373 points
559c7c659113cb3a040001a9_394714459
Submitted by
SpeedBuilders1
about 2 years ago

1 Comment

7fd49158a08eb9ee15b68ed69e31b01a?s=140&d=retro CodeGorilla373 about 2 years ago

name the array $friends instead of $tens. That's required in it.


0 votes

permalink

Yes, there is a bug...
Try remove the semi-colon at the end of "echo $tens[2]". It worked for me.

What seems strange to me is that it's writen without semi-colon at the example above instruncitons. (open image at new window to see the whole image)
printscreen of my screen on this task

1447 points
51659d5bce2948243b0008ce_618616358
Submitted by
Dimitris Pl
about 2 years ago