Forum Moderators: coopster
Just having a bit of trouble getting this working. I think the code is basic and should explain itself.
<?php
virtual('/include.php');
$result =mysql_query ( "select * from products WHERE feature ='yes' order by rand() limit 6");
while ($row = mysql_fetch_array($result))
{
echo '<li>';
echo '<div id="title">' . $row ['title'] . '</div>';
echo '' . $row ['nail'] . '';
$length = 200;
$shortdiscription = substr_replace($row['discription'], "....", $length);
echo '' . $row ['$shortdiscription'] . '';
echo '<div id="featureofferprice">' . $row ['onoffer'] . '</div>';
echo '' . $row ['morelink'] . '';
echo '</li>';
}
?>
I have posted all code so you can see in which context i'm trying to use it.
Its just this part i know is wrong as it will not display anything
$length = 255;
$shortdiscription = substr_replace($row['discription'], "....", $length);
echo '' . $row ['$shortdiscription'] . '';
Can you clever people piont me in the right diretion.
I have tried altering the code but no use.
all help welcome.
Thanks in advance
Joe Ski442