hi there,
i need to pass all this into a varible
echo '<table cellspacing="0" cellpadding="0" border="0" width=100%>
<tr>
<td valign=top bgcolor="#000000" width=155><p>'.$pagename.':~#</td>
<td valign=top bgcolor="#000000"><br>';
while ($story = $result->fetch_assoc())
{
echo '<li><a href=page.php?story='.$story['id'].'><b>'.$story['headline'].'</b></a> - By '.$story['writer'].',';
echo date('M d, H:i', $story['created']);
echo '<a href=page.php?story='.$story['id'].'> Read more ...</a><br>';
}
echo '<br></td>
</tr>
</table>';
one method i tried was to creat a function and then
$varible=funtion();
so i could pass all the content of the function into the vairable but the function is printed out wherever $varible=funtion(); is rather passing it to the varible
another method i tried was
$varible='<table cellspacing="0" cellpadding="0" border="0" width=100%>
<tr>
<td valign=top bgcolor="#000000" width=155><p>'.$pagename.':~#</td>
<td valign=top bgcolor="#000000"><br>'.
while ($story = $result->fetch_assoc())
{
.'<li><a href=page.php?story='.$story['id'].'><b>'.$story['headline'].'</b></a> - By '.$story['writer'].','.
echo date('M d, H:i', $story['created'])
. '<a href=page.php?story='.$story['id'].'> Read more ...</a><br>'.
}
.'<br></td>
</tr>
</table>';
in simple terms no echo but the '..' round any php code E.G.
$var='<some html>'.$sumvar.'<more html>';
but this gets stuck ont the while ($story = $result->fetch_assoc()) eliment
is there any way of doing this? or should i just give in?
thanks for any help
berrance