Page 1 of 1

Parse error

Posted: Mon May 07, 2007 1:30 am
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]

Posted: Wed May 09, 2007 5:54 am
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.