|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
bunker Smarty n00b
Joined: 18 Mar 2012 Posts: 2
|
Posted: Sun Mar 18, 2012 11:51 am Post subject: Ayuda mostrar en template elementos array |
|
|
Hola,
Primer post.. a ver si me ayudais con un tema seguro muy simple...
tengo esto:
Code: | $sql_query = "SELECT * FROM listing";
$rResult = mysql_query($sql_query) or die(mysql_error());
while ($row = mysql_fetch_assoc($rResult))
{
$aArray[$row['listing_id']] = $row;
}
$smarty->assign('rows', $aArray);
|
y lo que quiero es un template mostrar algo asi:
Code: | {$rows[52].listing_description_1|truncate:250} |
Pero cambiado 52 por el valor de listing_id
listing_id es un string entiendo, y por eso no me muestra nada...
Gracias x adelantado! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|