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

Arrays Forum

View Course » View Exercise

189 points
Picture
Submitted by
蕭文翔
almost 3 years ago

4/7 I can't see Any one issue... Help~

my code is this

<?php
$tens = array(10, 20, 30, 40, 50);
echo $tens[2];
?>
but i can't submit this code... have Error


0 votes

permalink

I'm having the same issue... Dunno. Hopefully someone who knows what they're doing will come along.

624 points
A4bdae04447b85b1e8a04b237dccbb42?s=140&d=retro
Submitted by
Thomas Urbanak
almost 3 years ago


0 votes

permalink

Right, well I got sick of waiting, and just started fooling around. What I ended up doing was copying all the code I had, commenting it all out, and then pasting it all below the commented code. It worked for me. Sometimes CodeCademy just glitches...

624 points
A4bdae04447b85b1e8a04b237dccbb42?s=140&d=retro
Submitted by
Thomas Urbanak
almost 3 years ago


0 votes

permalink

i try to mach ~ he still in hear...

189 points
Picture
Submitted by
蕭文翔
almost 3 years ago


0 votes

permalink

<?php
$tens = array(10, 20, 30, 40, 50);
echo $tens[2]
?>
write echo $tens[2] without semicolon and you'r passed. :D

376 points
Fb49b0a375c2519c09e314bc5d690b7f?s=140&d=retro
Submitted by
acm_thapa
almost 3 years ago

1 Comment

Picture Pasi Gauriloff over 2 years ago

this works WITH semicolon after $tens[2]

like this:

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