Arrays - 3/7 - Creating Your First Array Bug with foreign characters


I was working on this section and when I enter this code:

$friends = array("Ryan", "Dylan", "Zoë", "Jack");

For some reason when I put this in, it returns with an error saying that I need 3 or more names, and that they need to be in quotes.

Any solutions, or is this just a bug?

Any feedback is great. Thanks!


Yes, it seems a bug. Try using:

$friends = array("Ryan", "Dylan", "Zoa"); // without that ë and only three elements

as a workaround. The SCT uses a regex:


when it could have simply checked the length property of the array. I will add this to bugs spreadsheet. Thanks for reporting! :smiley:


I had the same bug when I used the name "Søren"


Thanks for the confirmation! Seems like the SCT is disallowing arrays when they contain one or more non-English character.


Still an issue, also an issue earlier in the course when typing $myName = "Øyvind"


Frank Michael is technically a first name, but it doesn't like the space.


Bug is still there for the space...