The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi,
in one of my codes I have Code:
$listings = "<a href=reviews.php?s=$session[sessionhash]&action=view&revid=$ra[id]>$ra[review_name]</a>-$ra[review_by]<br>"; eval("dooutput(\"".gettemplate("reviews_list")."\");"); I saw a code that firefly posted, see below: Code:
function loop_template($vars, $template, $subtemplate, $table, $conditions = '') { global $DB_site; $dblink = $DB_site->query("SELECT $vars FROM $table $conditions"); while ($db_array = $DB_site->fetch_array($dblink)) { foreach ($db_array as $field => $value) { // DO NOT use while here $array["{$subtemplate}_{$field}"] = $value; unset($array["$field"]); } eval('$return .= "'.gettemplate($template.'_'.$subtemplate).'";'); } $DB_site->free_result($dblink); return $return; } Thanks in Advance Drk |
#2
|
||||
|
||||
![]()
what do you mean by repeat? Are you trying to echo it X times in your template or screen or smt?
What about this: $listing1 = str_repeat($listing , 10); Needless to say I'm sure you know how to use "for" loops, I guess? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|