Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

NEED HELP->Byvesti vse znacheniya assoc .massiva s sect

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Russian
View previous topic :: View next topic  
Author Message
Lola
Smarty n00b


Joined: 05 Jul 2007
Posts: 3

PostPosted: Thu Jul 19, 2007 11:36 am    Post subject: NEED HELP->Byvesti vse znacheniya assoc .massiva s sect Reply with quote

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
Smile
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.




........................................................................................................
Smile Smile
NASLA RESHENIE PROBLEME s pomoshju
{html_options name=customer_id options=$cust_options selected=$customer_id}


Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Russian All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP