Jump to content

Array Fundamentals in PHP


matthewbauer

Recommended Posts

I am use to other languages like Python and C and one part of PHP I don't understand is arrays.

 

When I have a script that does something like this:

$names = Array("Me", "Myself", "I");
echo $names[0];

I get an error along the lines of: Parse error: syntax error, unexpected '[', expecting ',' or ';'. So are there any alternatives to the sample script I have above?

Link to comment
https://forums.phpfreaks.com/topic/157325-array-fundamentals-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.