Jump to content

[SOLVED] "substr"


shaunno2007

Recommended Posts

how can i put it with this cos i have this...

<?php
while($website_row = mysql_fetch_array($website_result))
{
?>   

  <a href="http://<?php echo $website_row['url']; ?>"  target="_blank"><?php echo substr ($website_row['link'], 0, 76). "<br />" ; } ?></a>

 

 

 

 

<?php
while($website_row = mysql_fetch_array($website_result)){
?>
<a href="http://<?php echo $website_row['url']; ?>"  target="_blank">
<?php 
if(strlen($website_row['link']) > 76){
     echo substr($website_row['link'], 0, 76) . '<br />' ;
} else{
     echo $website_row['link'];
} 
?>
</a>
<?php } ?>

Archived

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

×
×
  • 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.