![]() |
eval parse error.
I get this error when I try to run this code in vb3.
Error: Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\vb3\tutorials.php(136) : eval()'d code on line 5 Code: eval('print_output("' . fetch_template('games_view') . '");'); It looks correct to me, but I get a error non the less. If anyone can help me that would be great. Thanks for your time - Neo Ninja :ninja: |
Quote:
|
Edit:
Your code is right, what's on line 5? Is there any lines above it that have a missing ' or ; |
I'd say you've got a $var['key'] somewhere in your template :) You can't quote your keys in templates unless their inside an if condition tag :)
|
Quote:
|
Yep me too - as you write more and more code you can pinpoint these errors in seconds :)
|
Quote:
Can you explain this a little better for me? |
It has nothing to do with vB3, you'd get that error in a vB2 template, or any template for that matter.
In the templates, unless in an <if> condition., variables with keys must be like $var[key] and not $var['key']. |
ok, so I just checked the template, and there is nothing in the template itself.. and I have always used $var[key] with vb templates.
|
Can you paste the template here for us?
|
Usually the vB3 template system will prompt an error page, if you have improper variable syntax upon saving your template.
Are you including the global.php as necessary in that PHP file? |
All times are GMT. The time now is 10:13 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|