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

Arrays Forum

View Course » View Exercise

373 points
C0c9d85676f88d595793788473a48fc3?s=140&d=retro
Submitted by
esmerel
about 4 years ago

Syntax is failing to work

<?php
$tens = array(10, 20, 30, 40, 50);
echo $tens{0};
?>

This ought to echo '10', but neither this exercise or 1.4 is parsing the echo. It says "You aren't printing anything!'. And yet, clearly I am.


1 vote

permalink

And when I left the page and came back, it worked just fine. Nevermind :/

373 points
C0c9d85676f88d595793788473a48fc3?s=140&d=retro
Submitted by
esmerel
about 4 years ago

2 Comments

5143282795b467b5c3006e47_202960785 Kareem Damen about 4 years ago

same shit)

5092a995ad2dd50200005239_943235022 Brendon Allison about 4 years ago

u need to at the number 2 in the curly braces not 0