|
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 |
Lola Smarty n00b
Joined: 05 Jul 2007 Posts: 3
|
Posted: Thu Jul 19, 2007 11:36 am Post subject: NEED HELP->Byvesti vse znacheniya assoc .massiva s sect |
|
|
Prochitav in documentation
pytalas sdelat no ne vyhodit
Zadacha : nujno vyvesti vse znacheniya polej : t,p,c
no kak?
moi kodphp:
Code: |
$sql="SELECT
t as mt,
c as mc,
p as mp
FROM
table" ;
$result=mysql_query($sql)or die(mysql_error());
while( $row=mysql_fetch_assoc($result))
{
$mg=array( "mt" => array( "mt" => $row['mt']),
"mc" => array( "mc" => $row['mc']),
"mp" => array( "mp" => $row['mp'])
);
$smarty->assign("mg",$mg);
} |
moi tpl:
Code: |
{section name="mg_n" loop=$mg.mt}
<tr>
<td>
<fs:select name="mgtext" size="1">
<fs:options options="$mg.mt[mg_n]">
</fs:select>
{/section}
|
chto ne tak podskajite on prosto nichego ne pokazyvaet i oshibok net ne ponyatno v kakuu storonu topat
zaranee spasibo
Smarty Debug Console : pokazyvaet:
Array (3)
mt => Array (1)
mt => "znachenie 1..."
mc => Array (1)
mc => "..znachenie 1..."
mp => Array (1)
mp => 1
no na formu ne vyvodit nichego dage select.
........................................................................................................
NASLA RESHENIE PROBLEME s pomoshju
{html_options name=customer_id options=$cust_options selected=$customer_id}
|
|
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
|