4.3 Creating your first array



I dont have friends.

Okay ... so I'm coding (as usual) and unfortunately im stucked on this exercise.
You want me to put names of my friends into the array.
But I dont have any friends. What can I do ? Should I find some friedns ?
Or just stop coding ? Im confused please help me :(


Nobody is expecting us to name our friends, specifically. Just make up a list of names and use them.

          $friends = array("Scott", "Mike", "Neil");

The main objective is to learn how to write an array data structure using the correct syntax. Note the components.

$friends       => a variable name or descriptor with a leading $

    =          => assignment operator

 array         => array keyword

    ();        => parentheses followed by mandatory semi-colon

"Scott","Mike" => quoted string elements comma separated


Oh thank you very much :slight_smile: You saved me :smiley: