/    Sign up×
Community /Pin to ProfileBookmark

Parse error: syntax error, unexpected $end

This has been baffling me for the past 24 hours. i keep on getting the below error:

Parse error: syntax error, unexpected $end in …..modWidths.php on line 108

Below is the code:

[QUOTE]

<script language=”javascript” type=”text/javascript”>
jQuery(document).ready(function() {
jQuery = jQuery.noConflict();

// ModTitle Fixes
var modTitleWrapWidth = jQuery(‘#userOne .module .tick’).width();
jQuery(‘#userOne .module .tick .modtitlewrap’).width(modTitleWrapWidth).css(“margin”, “0px auto”);

var leftmodTitleWrapWidth = jQuery(‘#left .module .tick, #left .module .default’).width();
jQuery(‘#left .module .tick .modtitlewrap, #left .module .default .modtitlewrap’).width(leftmodTitleWrapWidth).css(“margin”, “0px auto”);

var rightmodTitleWrapWidth = jQuery(‘#right .module .tick, #right .module .default’).width();
jQuery(‘#right .module .tick .modtitlewrap, #right .module .default .modtitlewrap’).width(rightmodTitleWrapWidth).css(“margin”, “0px auto”);

jQuery(‘#maincontent div.usermodwrap:last-child, #bottomMods div.usermodwrap:last-child’).css({padding:”0px”});

// User4 , User5, User6

/* var userFouruserFiveuserSixWidth = jQuery(‘#userFouruserFiveuserSix’).width()/<?php echo $user4_user5_user6_count?>-60;

jQuery(‘#userFouruserFiveuserSix div.usermodwrap .usermod’).width(userFouruserFiveuserSixWidth); */

<?php if($user4_user5_user6_count == 3) : ?>
jQuery(‘#userFouruserFiveuserSix div.usermodwrap:nth-child(0)’).each(function(){
jQuery(this).css(“width”, “337px”);

})

<?endif;?>

<?php if($user4_user5_user6_count == 2) : ?>
jQuery(‘#userFouruserFiveuserSix div.usermodwrap:nth-child(0)’).each(function(){
jQuery(this).css(“width”, “60%”);

})
jQuery(‘#userFouruserFiveuserSix div.usermodwrap:nth-child(1)’).each(function(){
jQuery(this).css(“width”, “40%”);

})

<?endif;?>

<?php if($user4_user5_user6_count == 1) : ?>
jQuery(‘#userFouruserFiveuserSix div.usermodwrap:nth-child(0)’).each(function(){
jQuery(this).css(“width”, “100%”);

})

<?endif;?>

jQuery(‘#userFouruserFiveuserSix div.usermodwrap:last’).addClass(“last”);
jQuery(‘#userFouruserFiveuserSix div.usermodwrap’).eq(1).addClass(“second”);

// bottomMods
var bottomModsWidth = jQuery(‘#bottomMods’).width()/<?php echo $bottomMods_count?>-7.5;

jQuery(‘#bottomMods div.usermodwrap .usermod’).width(bottomModsWidth);

jQuery(‘#bottomMods div.usermodwrap:nth-child(2)’).css(“float”, “right”);

jQuery(‘.module .centerH3’).each(function() {
var centerH3Width = jQuery(this).children().children().width() + 21;
jQuery(this).width(centerH3Width).css(“margin”, “0px auto 12px auto”);
jQuery(this).children().children().css(“float”, “none”);
jQuery(this).children().css(“float”, “none”);
});

jQuery(‘.module .tick .leftArrow, .module .default .leftArrow’).each(function() {
var leftArrowWidth = jQuery(this).width();
var leftWrapWidth = jQuery(this).parent().parent().width() / – leftArrowWidth;
jQuery(this).width(leftArrowWidth);
jQuery(this).css({‘margin’ : ‘0px 0px 0px ‘ + leftWrapWidth + ‘px’});
jQuery(this).parent().width(leftArrowWidth);
});

});

jQuery(window).load(function() {
jQuery = jQuery.noConflict();

// Right Column Height
var contentHeight = jQuery(‘#content’).height();
var rightColumnHeight = jQuery(‘#rightcolumn’).height();
if(rightColumnHeight > contentHeight) {
contentHeight = rightColumnHeight;
jQuery(‘#rightcolumn’).height(rightColumnHeight);
}
else {
jQuery(‘#rightcolumn’).height(contentHeight);
}

if(jQuery.browser.msie && parseInt(jQuery.browser.version) <= 7) {
var docHeight2 = jQuery(“body”).height();

}
else {
var docHeight2 = jQuery(document).height();

}
jQuery(‘#footerBG’).css(“top”, docHeight2 + “px”).css(“position”, “absolute”);

});

</script>

[/QUOTE]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@SrWebDeveloperMay 17.2010 — Probably where you have a couple instances of this:

[code=php]<?endif;?> [/code]

Should be:

[code=php]<?php endif; ?> [/code] (note the spacing also)

If you change it and still no good, the only other issue I see is the variable $user4_user5_user6_count you are referencing in your PHP code is not defined anywhere (at least not in the code you posted here).

-jim
×

Success!

Help @malawian spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...