View Full Version : issue with repeat region

10-19-2008, 05:57 PM

a quit new with dreamweaver and php. At the moment i have a problem with repeat region. Can someone help me with solving this problem?

i like to repeat the bold part. the problem seems to lie in the substr script. Anyone a suggestion?

<?php do { ?>
<table width="600" border="0" cellpadding="0">
<!-- start maintekst -->
<td width="600">
<a href="content.php?CONTENTNAME=<?php echo $row_content['CONTENTNAME']; ?>"class="linkmain">
<span class="datetimemain"><?php echo strftime("%d-%m-%Y")?></span>
<span class="contentnamemain"> <?php echo $row_content['CONTENTNAME']; ?></span>&nbsp;&nbsp;
<span class="auteurmain"> <?php echo $row_content['AUTEUR']; ?></span>
<img src="<?php echo tNG_showDynamicImage("", "images/main/", "{content.IMAGE_MAIN}");?>" width="70" height="70" border="0" align="right" />
<?php $tekst = $row_content['CONTENT'];
$lengte = 400; // Maxmiaal aantal tekens (zonder toevoeging)
$toevoeging = '<i>...lees meer...</i>'; // Wat er achter komt
$kort = afkorten($tekst, $lengte, $toevoeging);
echo $kort;
// De functie
function afkorten($tekst, $lengte, $toevoeging)
$tmp = substr($tekst, 0, $lengte) . $toevoeging;
return $tmp;
?></a> </td>

<!-- End maintekst -->
<?php } while ($row_content = mysql_fetch_assoc($content)); ?></div>

it works when i get the repeat region off. And its works also without the substr part.

thanks for the reactions!