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

Arrays Forum

View Course » View Exercise

975 points
534fde479c4e9d17570016c7_906302282
Submitted by
Yazid
over 3 years ago

Instructions are incorrect (Lesson 1.2)

Hello there!

I hate to be a bother, but the instructions are incorrect in this lesson. They tell you to:

// Add your array elements after
// "Beans" and before the final ")"

Judging from this text, I'm suppose to add the array elements "Chips" and "Sausage" after the array element "Beans", right? Well, it didn't work! To demonstrate, I'll show my coding:

<html>
<head>
<title>Woot, More Arrays!</title>
</head>
<body>
<p>
<?php
// Add your array elements after
// "Beans" and before the final ")"
$array = array("Egg", "Tomato", "Beans", "Chips", "Sausage");
?>

</p>
</body>
</html>


In order for me to solve this mysterious problem, I had to switch the array elements around; putting the array elements "Chips" and "Sausage" behind the array element "Beans". So, for those of you who might be having trouble, here is the passing code:
<html>
<head>
<title>Woot, More Arrays!</title>
</head>
<body>
<p>
<?php
// Add your array elements after
// "Beans" and before the final ")"
$array = array("Egg", "Tomato", "Chips", "Sausage", "Beans" );

?>
</p>
</body>
</html>


A switch in the instructions would be very helpful! Please fix this. :)


2 votes

permalink

You need to put "Chips" and "Sausage" before "Beans", which is weird because the instructions clearly say to put them after "Beans".

1027 points
Dacbca67435f014a00db9acfb446248e?s=140&d=retro
Submitted by
miphiibunny
about 3 years ago

2 Comments

004ccac227468795636f29e8b04647f4?s=140&d=retro Farah A over 2 years ago

Then why the heck did the instructions tell me to type them after "Beans"!?! Hello! "After" and "Before" are completely two different things in my head!

Dacbca67435f014a00db9acfb446248e?s=140&d=retro miphiibunny over 2 years ago

I don't know, the instructions have a bug.


1 vote

permalink

Woot, More Arrays!



<?php
// Add your array elements after
// "Beans" and before the final ")"
$array = array("Egg", "Tomato", "Chips", "Sausage", "Beans" );

?>

412 points
4d87280ff6364e8f1999684abc6e50ff?s=140&d=retro
Submitted by
ChyenneeCollins2017
about 3 years ago


0 votes

permalink

You had to switch? Weird I had exactly what your 1st code was and I passed. There was probably a simple glitch in your webpage, nothing serious unless has anything else been acting weird? If there is let me know.

1491 points
5307b56e548c35feba001e34_170716399
Submitted by
Dylan Pool
about 3 years ago

2 Comments

40b65a630d7ce51440895cf8d90ff9ec?s=140&d=retro alistaire about 3 years ago

The exact same thing happened to me. I've had to refresh a lot, because it hangs when I submit code (the "Submit" button turns to a gear, but doesn't resolve).

985162904d0ccd9a901b3120fe8e2363?s=140&d=retro Jylian over 2 years ago

I'm having the Submit button issue and the issue with the Chips/Sausage too