PHP & Smarty Templates - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

PHP & Smarty Templates

silverCoder909silverCoder909 Posts: 1Member
I have my class

class Announcement
public $ID;
public $info;

public function __construct() { }

I use mysqli to interface with my database and create an array of objects

$result = array();
while( $row = $some_sth->fetch_object() )
$tmp = new Announcement();
$tmp->ID = $row->ID;
$tmp->info = $row->info;
$result[] = $tmp;

I want to output this array of objects in my smarty template but I cannot seem to figure out how. Any help would be appreciated.

-DB access is not the problem; I can echo out the array of objects just fine and output is as expected.

-smarty setup/configuration is fine. I can assign other variables and they display just fine.

Again, if anyone can help me get the array of objects to output in smarty, I'd really appreciate it.


  • MiskatMiskat Posts: 7Member
    Nice job... keep it up ... jquery integration with make it better ... can i use codecanyon with this ????????????
Sign In or Register to comment.