This forum is now read-only. Please use our new forums! Go to forums
Is this a glitch? "Oops, try again. Did you remember to use array() in your code?"
After running my code, everything works, but I don’t advance to the next level, it says:
Oops, try again. Did you remember to use array() in your code?
Here is my code(everything works fine from what I can see):
<?php
// Create an array and push 5 elements on to it, then
// print the number of elements in your array to the screen
$names = array();
array_push($names, "George");
array_push($names, "Frank");
array_push($names, "Andy");
array_push($names, "Morgan");
array_push($names, "Kate");
print count($names);
?>
Answer 5514066e51b8870dba001870
It seems to be a bug with the type of browser you are using, try switching from whatever browser you are using to a different one, if that doesn’t work I recommend looking at responses to your question in the Q&A section, I find the majority of my answers there even if I’m not the one asking the questions.
Answer 551b14c19376769dc3000a58
Answer 55748579e39efe040c000619
I’ve tried chrome, firefox and even internet explorer shudders. Which browser have people had luck with? I am not pc so no safari for me.
Answer 560a9e29937676235d0001b2
I was having a problem like this, except my code was:
<?php
// Create an array and push 5 elements on to it, then
// print the number of elements in your array to the screen
$friends = array();
array_push($friends, "Phlox");
array_push($friends, "Mathilde");
array_push($friends, "Eva");
array_push($friends, "Ellen");
array_push($friends, "Jos");
print count($friends);
?>
After I removed the empty line after $friends = array(); I passed the question. Maybe removing empty rules will help you guys too.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
print this after you writen your five points //print 5 next to print count
Try to refresh you page because I tryed it and it worked because i copied and pasted +Colmonkey code.