function monnzi($monnzi){ $countM = strlen($monnzi); if ($countM > 20){ return "..."; } } function setDate($inDate){ $newDate = substr($inDate,0,4) . "/" . substr($inDate,4,2) . "/" . substr($inDate,6,2); return $newDate; } $dbi = mysql_connect("localhost","incc","incc2811"); mysql_select_db("incc",$dbi); $tbName = "SCHOOL_LTU"; $ord = "ORDER BY INDATE DESC"; $strSQL = "SELECT * FROM $tbName $ord"; $result = mysql_query($strSQL,$dbi); ?>
| if ($row[IMAGE] != ""){ ?> |
=setDate($row[INDATE])?> =$row[TITLE]?> =substr($row[MEMOIRS],0,40)?>=monnzi($row[MEMOIRS])?> |