$matches = make_array(get_matches($teamnumber, {$event[0]["eventid"]}));
Parse error: syntax error, unexpected '{' in /home/flyingco/public_html/team_info.php on line 36
Can't figure out whats wrong with that...
code:
http://pastebin.com/XfunYQy1
Its my first time using php so its probably something stupid...
Parse error: syntax error, unexpected on line 36
Moderator: General Moderators
-
flyingcow93g
- Forum Newbie
- Posts: 2
- Joined: Sat Mar 13, 2010 8:57 am
Re: Parse error: syntax error, unexpected on line 36
When posting code, please use the syntax so it looks like this:
To answer your question, remove the curly braces. Curly braces are used around variables only when they appear in strings.
Edit: This post was recovered from search engine cache.
Code: Select all
Code: Select all
$matches = make_array(get_matches($teamnumber, {$event[0]["eventid"]}));Code: Select all
$matches = make_array(get_matches($teamnumber, $event[0]["eventid"]));
Last edited by McInfo on Thu Jun 17, 2010 5:29 pm, edited 1 time in total.
-
flyingcow93g
- Forum Newbie
- Posts: 2
- Joined: Sat Mar 13, 2010 8:57 am
Re: Parse error: syntax error, unexpected on line 36
Thanks.
Now, is an array. I do I count the amount of "eventid" in it? I tried but didn't get it..
Now,
Code: Select all
$yearevents[0]["eventid"]Code: Select all
count($yearevents[0]["eventid]"))-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: Parse error: syntax error, unexpected on line 36
Just remove "{" and "}" from line 36.