Da Foxx Posted July 30, 2009 Share Posted July 30, 2009 I'm pretty new to Smarty, and the reason why I choose it was because it seem like the most easiest to learn without having to actually learn a whole new language. This is what I have: {foreach from=$forum_posts item=post} <tr> <td> <span class="small"> <b><a href="index.php?profile={$post->author}">{$post->author}</a></b> <br /> </span> </td> <td>{$post->message}</td> </tr> {/foreach} This is where my problem is. I need to get {$post->author} and put into a function so that it can take the name of the author and look for it in another database table and retrive the information, like post count, msn, and etc. How would I do that without having to start mixing my php code with html where it can get ugly. Link to comment https://forums.phpfreaks.com/topic/168060-smarty-template-engine-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.