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

Functions, Part I Forum

View Course » View Exercise

86 points
3f8a36277f7182c51919f349bd7ade16?s=140&d=retro
Submitted by
thanosarta13
over 2 years ago

What`s wrong with this?

<?php
// Create an array and push 5 elements on to it, then
// print the number of elements in your array to the screen
$favbands = array();
array
push($favbands, "MJ");
array
push($favbands, "GB");
array
push($favbands, "FK");
array
push($favbands, "PK");
array
push($favbands, "IK")

print count($fav
bands);
?>


1 vote

permalink

Look at what error you're getting.

I think the error is that you should be using the function array_push() and that arraypush() does not exist.

453 points
55bc7107e39efe516f000266_761455818
Submitted by
Lydia Doza
over 2 years ago