Results 1 to 2 of 2

Thread: Create an array and it throws a parse error, wha?

  1. #1
    Join Date
    Jun 2006
    Under your bed

    Create an array and it throws a parse error, wha?

    If I try this:
    PHP Code:
    $sue = array(); 
    Or This:
    PHP Code:
    $sue['red'] = 2
    Or Even This:
    PHP Code:
    $sue = array();
    $sue['red'] = 2
    I get this error:
    Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\xampp\site\index2.php on line 4

    The better I get at programming, the more I appreciate arrays. Handy dandy things they are.

  2. #2
    Join Date
    Aug 2004
    Most likely something wrong with the preceding command, such as a missing terminal semicolon.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles