Parse error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kumarangopi
Forum Newbie
Posts: 10
Joined: Wed Oct 18, 2006 7:43 am

Parse error

Post by kumarangopi »

Jcart | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


lengthlink.php file Line 126 :

Code: Select all

<img src="chart.php?style=<?=GrowthChart::STYLE_LENGTH_AGE ?>&sex=<?=$mmonth?>&maxage=35&xvals=<?=$xvals?>&yvals=<?=$yvals?>"/>
Error:
Parse error:syntax error, unexpected ';', expecting '(' in /opt/lampp/htdocs/sourcejp1.21/lengthlink.php on line 126
Can you tell me why the error is coming in PHP4 and no errors in PHP5?Thanks in advance


Jcart | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]2.[/b] Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.[/quote]
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Could be to do with your use of short tags and configuration settings. You should always use "<?php" rather than just "<?" and use "echo" where necessary. Short tags may make life easier when creating but when changing a server it can be a nightmare especially if you cannot change the php.ini file.
Post Reply