Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with <?php....?>


carthrina

Recommended Posts

Posted

Hello,

 

I have a multilanguage template. I want to modify Search By Brand text into different languages. This text is in header.php. I tried to replace it by a vriable. I used <?=HEADER_BRAND?> as a vriable, and I added it in the languages/anylanguage.php as define(HEADER_BRAND, 'Search by Brand');

 

But I have encountred a problem with the closing ?> because this vriable is used between two other <?..?>

This is my code:

 

 

<?   // ---- MANUFACTURERS


 $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
 if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

  echo '	   <table cellspacing=0 cellpadding=0>'.
			   tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')
			   .'<tr><td background=images/m19.gif width=229 height=36 class=bc>         <b><?=HEADER_BRAND?></b></td></tr>
				 <tr><td>
					  <table cellspacing=0 cellpadding=0 width=195 align=center>
					   <tr><td colspan=2 height=20></td></tr>
					   <tr><td align=right>
	   ';	
.
.
.
.
the rest of the code


?>

 

 

 

Please kindly help, your ideas are much apperciated.

 

Regards,

Posted

try this:

 

<?php // ---- MANUFACTURERS

 

 

$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

 

echo ' <table cellspacing=0 cellpadding=0>'.

tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')

.'<tr><td background=images/m19.gif width=229 height=36 class=bc>         <b>' . HEADER_BRAND . '</b></td></tr>

<tr><td>

<table cellspacing=0 cellpadding=0 width=195 align=center>

<tr><td colspan=2 height=20></td></tr>

<tr><td align=right>';?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...