0

I m using substr in while loop. Using substr I am getting strike in Text; If I omit substr then I get perfect result. I have to substr function; Is there any another alternate function.

if($countrecords>=0)
	{
     while($row1=mysql_fetch_array($result1))
      {
	  ?>
		<div style="border-top:1px dashed #cccccc; padding-top:10px;">
		
		<div style="font:bold 11px verdana; padding:10px 0 8px 0; width:100%;" class="headinga">
		<a href="show_job.php?id_no=<?php echo $row1['j_id']; ?>" style="color:#551001; font:bold 12px verdana">
		<?php echo $row1['j_heading']; ?></a>
		</div>
		
		<div style="width:100%;">
		<?php 
		echo substr($row1['j_des'], 0,600).'  ..........'; ?>
		</div>
		
		<div style="color:red;padding:0px 8px 30px 0px;font-family:Verdana;  ">
		<a href="show_job.php?id_no=<?php echo $row1['j_id']; ?>" style="color:blue; font:normal 12px verdana; float:right;" >
		more... </a>
		</div>
		
		</div>
		<?php
        }
      }
?>

Edited by jacob21: n/a

3
Contributors
5
Replies
7
Views
5 Years
Discussion Span
Last Post by wetube
0

the substring works for me
are you sure that $row is a string?
or maybe I don't understend 'getting strike in Text'

0

the substring works for me
are you sure that $row is a string?
or maybe I don't understend 'getting strike in Text'

It is working on Local but not on server, and second thing it is not string; its is BLOB type in mysql.

0

a BLOB is not a string
can't you use a VARCHAR
you are just echo-ing it so a assume it's just a large text

0

a BLOB is not a string
can't you use a VARCHAR
you are just echo-ing it so a assume it's just a large text

So.. There is any solution?; coz I have to use substr function.. there is any alternate function.. ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.