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

Control Flow: Switch Forum

View Course

146 points
Submitted by
Carmen Buta
over 2 years ago

I need to delete Phyton from the array, why is not working?

I am pretty sure that I am doing it right, but I still can't pass to the next level. What did I do wrong?

Modifying Elements

$languages = array("HTML/CSS",
"JavaScript", "PHP", "Python", "Ruby");
// Write the code to remove Python here!


    // Write your code above this line. Don't
    // worry about the code below just yet; we're
    // using it to print the new array out for you!

    foreach($languages as $lang) {
      print "<p>$lang</p>";

0 votes


array(0 "HTML/CSS", 1 "JavaScript", 2 "PHP",3 "Python", 4 "Ruby");

Change unset($languages[2]); in unset($languages[3]);

1409 points
Submitted by
over 2 years ago

1 Comment

5605557d9113cba113000166_519261121 Carmen Buta over 2 years ago

Thanks! :)