I'm beginning to get a little confused by something. Maybe my query needs to be changed for this.
In a nutshell, what is the difference between :
PHP Code:
$cc = $DB_site->query(" SELECT * FROM tagio ");
while ( $cy = $DB_site->fetch_array ( $cc ) ) :
$taglist = "$cy[tags]";
endwhile;
// calling $taglist in the template
eval("dooutput(\"".gettemplate("cc_tag_test")."\");");
or
PHP Code:
$cc = $DB_site->query(" SELECT * FROM tagio ");
while ( $cy = $DB_site->fetch_array ( $cc ) ) :
$taglist = "". $cy[tags] ."<br>";
endwhile;
// calling $taglist in the template
eval("dooutput(\"".gettemplate("cc_tag_test")."\");");
when compared to:
PHP Code:
$cc = $DB_site->query(" SELECT * FROM tagio ");
while ( $cy = $DB_site->fetch_array ( $cc ) ) :
echo "$cy[tags]";
endwhile;
??
The problem is
$taglist=""; in the template isn't calling the loop -- only the first result of the loop, while
echo=""; calls everything in the loop fine and as it should.
I need the looped results to display in the template using $taglist - but apparently I'm doing something wrong here.
PS. Moved
and erased this from another thread - was off-topic to that particular thread.