Syntax error - do I have too many '}'

Parse error: syntax error, unexpected '}'

Page 1 of 1

4 Replies - 1999 Views - Last Post: 29 September 2010 - 08:25 PM Rate Topic: -----

#1 Murdertonic   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 29-September 10

Syntax error - do I have too many '}'

Posted 29 September 2010 - 04:35 PM

Hello

I have been looking at this code unsucessfully. It is from OSCommerce Monster Template, and there seems to be a few errors. Ther are no contributions - just a new install. This error code I get is.... Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\shop\includes\modules\product_listing.php on line 302

It appears to refer to the '}' after the line reading..../*echo tep_draw_heading_bottom_3();*/
Here is the section of code. I have attached the complete filr if required.



new contentBox($info_box_contents); 
//    new productListingBox($list_box_contents);
 } else {  ?>
 


<?php /*echo tep_draw_heading_top_3();*/ ?>

<br style="line-height:1px;"><br style="line-height:15px;">
 	<table border="0" cellspacing="0" cellpadding="2" class="infoBox box_width_cont">
          <tr class="infoBoxContents">
            <td>
				<table cellpadding="0" cellspacing="0" class="product">
					<tr><td class="sea_2"><?php echo TEXT_NO_PRODUCTS ?></td></tr>
				</table>
			</td>
		  </tr>
	</table>
				
<?php
	
/*echo tep_draw_heading_bottom_3();*/ 
			
  }
  

  if ( ($listing_split->number_of_rows> 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>

<?php echo tep_draw_result_bottom(); ?>

<table border="0" cellspacing="0" cellpadding="0" class="result box_width_cont">
  <tr>
    <td><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
    <td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
  </tr>
</table>
<?php
  }
?>


Attached File(s)



Is This A Good Question/Topic? 0
  • +

Replies To: Syntax error - do I have too many '}'

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5552
  • View blog
  • Posts: 14,558
  • Joined: 18-April 07

Re: Syntax error - do I have too many '}'

Posted 29 September 2010 - 04:39 PM

You have this line <?php echo TEXT_NO_PRODUCTS ?>. You need to put in a semicolon to end that statement. Otherwise it will read that }
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6876
  • View blog
  • Posts: 31,671
  • Joined: 10-May 07

Re: Syntax error - do I have too many '}'

Posted 29 September 2010 - 08:14 PM

Line three starts with a end curly bracket, but I don't see where one begins...?

What does the 'else' match? Where is the 'if' statement?
Was This Post Helpful? 0
  • +
  • -

#4 Valek   User is offline

  • The Real Skynet
  • member icon

Reputation: 544
  • View blog
  • Posts: 1,713
  • Joined: 08-November 08

Re: Syntax error - do I have too many '}'

Posted 29 September 2010 - 08:21 PM

The code he posted in code tags starts at what is actually line 279 of the attached file. That's why you don't see an opening brace. It's on line 97.
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6876
  • View blog
  • Posts: 31,671
  • Joined: 10-May 07

Re: Syntax error - do I have too many '}'

Posted 29 September 2010 - 08:25 PM

Yeah, I've been thumbing through it.... I was too quick to reply.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1