Michael Crawley Michael Crawley - 4 months ago 46
PHP Question

Simple Array PHP

Simple array but I am getting an error. Even when create it in its own PHP page I still get an error. I am not experienced at this so be kind.

<?php $state = $array(Kentucky, New Mexico, New York, Alabama, Nebraska, Alaska, American Samoa, Arizona,
Arkansas, California, Colorado, Connecticut, Delaware, District of Columbia, Florida, Guam, Hawaii, Idaho,
Illinois, Indiana, Iowa, Kansas, Louisiana, Maryland, Massachusetts, Minnesota, Mississippi, Missouri, Montana,
Nebraska, Nevada, New Hampshire, New Jersey, North Carolina, North Dakota, Northern Marianas Islands, Ohio,
Oklahoma, Oregon, Pennsylvania, Puerto Rico, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah,
Vermont, Virginia, Virgin Islands, Washington, West Virginia, Wisconsin, Wyoming, Georgia, Maine, Michigan);


Any have any ideas as to the reason why?

Regards, MIke


Remove the $ in front of the word array.

<?php $state = array( ...

And put each array item in quotes.

"Kansas","New Mexico"