How to use array mysql result in tpl?


I need one big help. I have written the function in core/fn.companies.php file called fn_get_company_fb to retrieve the last 4 companies from companies table.

And now, i couldn’t use this functions result to anywhere. If i call this function using {some variable|fn_get_company_fb}, i’m getting the result as Array.

Note: i want the following things in detail:[list=1]

[]How to write a custom core function to retrieve the data from DB

]How to call that custom core php function to use in tpl(smarty) files

[*]Functions must return array of data not a single data.


Please looking for faster reply.

Thanks in Advance.

I know this doesnt help you @ all Curribhoys but i cant start a new thread.

Just wondering how does the MultiVendor even work???

I thought ME as the site owner and the VENDORS (aka Sellers) that I LETsell on my site, from each sale that they make i get a PERCENTAGE or FIXED AMOUNT of that sale as the site owner. I see how that somewhat functions correctly. But where is the site owner page saying where my cut is? I see sales report and and Vendor Account Balance…but where is my account balance for the profit im making as the site owner?

Maybe im just missing something but the concept seems a little weird to me.