Jump to content

TEXT data type breaking iteration


imimin

Recommended Posts

I am having problems with some code. I am echoing the following:

 

			      <HR width=80%>
		      ".substr($item_desc,0,85)."...

 

When I use VARCHAR as the data type, it works well with short text.  If I place a large amount of text in using TEXT as the data type and have a table in with the text, it breaks the iteration it is in. 

 

Can someone tell me what is going on?

Link to comment
Share on other sites

Everything seems to work fine with other HTML tags (like <B>, <BR>, etc) but for some reason it does not like my <TABLE> tag??? It breaks the echo output at the point of the table and prints the table inside my page that should only be displaying thumbnail images and a truncated description.  The code is as such:

 

			echo "<TD class=\"preview-images\" VALIGN=\"top\" WIDTH=\"25%\">
		      <CENTER><A HREF=\"$sitelocation" . "$item_url" . "?" . "item_desc=" . "$item_desc" . "&" ."item_prod_name=" . "$item_prod_name" . "&" ."item_available_colors=" . "$item_available_colors". "&" ."item_available_sizes=" . "$item_available_sizes". "&" ."item_retail=" . "$item_retail". "&" ."item_prod_code=" . "$item_prod_code". "&" . "item_img=" . "$item_img" . "&" ."item_selected_style=" . "$item_selected_style". "&" ."item_selected_color=" . "$item_selected_color". "&" . "item_selected_size=" . "$item_selected_size" . "&" . "item_weight=" . "$item_weight\">
		      <IMG SRC=\"includes/img_resize3.php?src=$sitelocation$item_img&width=144&height=144&qua=50\" BORDER=\"0\"></A>
		      <center><b>$item_prod_name</b></center>
		      <HR width=80%>
		      ".substr($item_desc,0,85)."...
		      <BR><BR>

 

The data (TEXT data type)that seems to be causing the the problem is:

 

Little Big Pants (drawstring waist)  unisex sizes range teen-adult
Causal fun style beach towel comfort pant for coming and going from the beach resort or pool, perfect for kicking back around the house.  KIDS LOVE THEM! Mid calf length, sizes are generous:<BR><BR>
<div align="left">
<table border="1" width="100%" cellpadding="1" cellspacing="1">
<tr>
  <td align="left">Size</td>
  <td align="left">Small</td>
  <td align="left">Medium</td>
  <td align="left">Large</td>
  <td align="left">Extra Large</td>
</tr>
<tr>
  <td align="left">Waist</td>
  <td align="left">26-28</td>
  <td align="left">30-32</td>
  <td align="left">34-36</td>
  <td align="left">36-46</td>
</tr>
<tr>
  <td align="left">Inseam</td>
  <td align="left">17</td>
  <td align="left">18</td>
  <td align="left">19</td>
  <td align="left">20</td>
</tr> 
</table>
</div>

 

Any ideas?

Link to comment
Share on other sites

I need the substr() to truncate my desc data on this thumbnail page.  The next page will show all the desc TEXT.  The substr() works fine for the data if I do not use the <table> tag. Would it help if I sent you the web page links so you can see what is going on?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.