Creating your First Array - Arrays


Hello people, I started learning PHP. And yep, it's buggy for a little. My code is fine, but it doesn't let me go. The error post looks like this:

Oops, try again. Did you remember to put at least three elements in your array? Make sure each one is a string in quotes!

If my eyes aren't lying, I have three elements with quotes in my array.

    <title>My First Array</title>
    $friends = array("people", "more people", "people again");


Hmm... Looks right to me.

My only suggestion for you, @papusalaatti, is to try fixing the indentation of the line where you declare the array. If you fix that, it should work.


I can't add spaces to the array. I changed it to three random strings without spaces, and that worked.


This is a bit irrelevant, but I remember suggesting that you take PHP a few weeks ago, so I'm glad you decided to! :)))


Yup, I took it yesterday and I understood that I love it.


I have the same issue. Get a hint isn't working either. I just cannot go further. Even if I copy yours, I cannot go further. What did you do?


Answered in post 3 by papusalaatti.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.