hola quisiera saber como hacer para tomar con este script los resultados de while en lugar del template en una variable.
Código PHP:
$tr_sql = mysql_query("SELECT * FROM ".DB_PREFIX."templates WHERE tID = '".$theme."' && tmName = 'cat_list'");
$tr=mysql_fetch_array($tr_sql);
$tableRow=$tr["template"];
$sql = mysql_query("SELECT * FROM ".DB_PREFIX."categories WHERE cParent = '".$cID."' ORDER BY cOrder ASC");
while($r=mysql_fetch_array($sql))
{
$cat_ID=$r["cID"];
$cName=$r["cName"];
$cDesc=$r["cDesc"];
$scCount=$r["scCount"];
$cat_row = str_replace("{php=cat_id}", $cat_ID, $tableRow);
$cat_row = str_replace("{php=cat_name}", $cName, $cat_row);
$cat_row = str_replace("{php=cat_desc}", $cDesc, $cat_row);
echo $cat_row;
}