ramaz Posted October 3, 2010 Share Posted October 3, 2010 (edited) Hello, I have a little problem with products page, I have looked trough forums, but haven't found anything similar. The deal is simple I need to add some smarty {$variables} to my products page. Variables should be Server groups name from "tblservergroups" and host name from "tblservers", I have found similar code, but it's made from serverstatus.php I have been tryingto get something out of it but nothing worked, variable was created, but data just don't get assigned. Heres the code: {php} foreach ($this->_tpl_vars['servers'] as $key => $value) { $result = select_query("tblservers","hostname",array("name" => $value['name'])); $data = mysql_fetch_array($result); $this->_tpl_vars['servers'][$key]['hostname'] = $data['hostname']; } {/php} Can anybody help me? By the way, I need those variables to be assigned, to main $services foreach function, that's the main problem and I can't find a solution. Edited October 3, 2010 by ramaz 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.