Jump to content


Unexpected errors...


6 replies to this topic

#1 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 19 November 2006 - 01:11 PM

well basically i am making a tutorial catergory system, here is what i got:

Code removed for security purposes, sorry guys...

can someone tell me why i get this error:

Quote

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /vhost/vhost1/n/a/s/xxxxxxxxxxxxxx on line 117


thanks,

Joe

Edited by The Creator, 20 November 2006 - 04:49 PM.


#2 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 19 November 2006 - 02:44 PM

what is on and around line 117 please.

#3 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 19 November 2006 - 04:36 PM

Code removed for security purposes, sorry guys

Edited by The Creator, 20 November 2006 - 04:50 PM.


#4 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 20 November 2006 - 07:32 AM

hmm only thing I can think off is this:

echo '<table><tr><td><img src="images/icons/".$2dr['image'].""></td><td>&nbsp;&nbsp; <a href='?view=tutorials&act=category&cid=".$2dr['id']."'>".$2dr['title']."</a></td></tr></table>';

Matt

#5 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 20 November 2006 - 01:53 PM

omg, i bet u cant beleive what it was...

the variable could only be one letter...

i had like $2dr, i just changed it to $a and it worked fine =.=

php :wacko:


thanks anyway guys :)

Joe

#6 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 20 November 2006 - 03:05 PM

View PostThe Creator, on Nov 20 2006, 06:53 PM, said:

omg, i bet u cant beleive what it was...

the variable could only be one letter...

i had like $2dr, i just changed it to $a and it worked fine =.=

php :wacko:


thanks anyway guys :)

Joe

Wow i can't believe i missed that...

The problem isn't the variable length, it is it's name. Variables cannot begin with a number.
http://uk2.php.net/variables

#7 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 20 November 2006 - 05:32 PM

cock how did i miss that aswell. Well matt we both suck and need to go back to 'Php for beginners class'.

Matt





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users