syntax problem - probably really obvious *(PLEASE HELP)

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
rbroadwell
Forum Newbie
Posts: 2
Joined: Wed May 06, 2009 5:19 pm

syntax problem - probably really obvious *(PLEASE HELP)

Post by rbroadwell »

Code: Select all

 
if( $blank != 0 )
{
    echo "<td colspan="$blank" class="pad">&nbsp;</td>";
}
 
THROWS
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a4537811/public_html/change_date.php on line 151

Please help.
Last edited by Benjamin on Wed May 06, 2009 5:49 pm, edited 1 time in total.
Reason: Added [code=php], [quote] tags.
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: syntax problem - probably really obvious *(PLEASE HELP)

Post by ldougherty »

change

Code: Select all

echo "<td colspan="$blank" class="pad">&nbsp;</td>";
to

Code: Select all

echo "<td colspan='$blank' class='pad'>&nbsp;</td>";
That should resolve the issue.
rbroadwell
Forum Newbie
Posts: 2
Joined: Wed May 06, 2009 5:19 pm

Re: syntax problem - probably really obvious *(PLEASE HELP)

Post by rbroadwell »

doh! fixed it. thanks so much
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: syntax problem - probably really obvious *(PLEASE HELP)

Post by ldougherty »

No problem, glad I could help out.
Post Reply