Mhtml
04-08-2003, 03:57 PM
I've included a file into my page:
require ("template.php");
Now in template.php I have:
strEmoticons = "<div class=\"emoticons\">$em1,$em2,$em3</div>";
Now in my mysql query loopy thingy:
while ($i<$numRows){
$em1 = mysql_result($result,$i,"em01");
$em2 = mysql_result($result,$i,"em02");
$em3 = mysql_result($result,$i,"em03");
echo strEmoticons;
i++}
The values for $em1, 2 and 3 aren't placed into the string.
I can fix it by have {em1}{em2}{em3} and replacing them in the string using str_replace or by including the file each time I loop, but I'd rather have it working like it would if I didn't just include it.
TIA! :):D:confused:
require ("template.php");
Now in template.php I have:
strEmoticons = "<div class=\"emoticons\">$em1,$em2,$em3</div>";
Now in my mysql query loopy thingy:
while ($i<$numRows){
$em1 = mysql_result($result,$i,"em01");
$em2 = mysql_result($result,$i,"em02");
$em3 = mysql_result($result,$i,"em03");
echo strEmoticons;
i++}
The values for $em1, 2 and 3 aren't placed into the string.
I can fix it by have {em1}{em2}{em3} and replacing them in the string using str_replace or by including the file each time I loop, but I'd rather have it working like it would if I didn't just include it.
TIA! :):D:confused: