Jump to content

I'm try to write php array into smarty....?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
arxh

arxh

    Newbie

  • Members
  • PipPip
  • 24 posts
hi... i'm try to array into checkbox and dropdown box.

this is my smarty array
{foreach from=$job_types key=k item=i}
<input type="checkbox" value="{$i.id}" />
{$k.type_name}
{/foreach}

this what i'm try to convert ...

(

* => JobType Object


(
[id] => 1
[var_name] => full_time
[type_name] => Full Time
[is_active] => Y
[errors] => Array
(
)

)

[1] => JobType Object
(
[id] => 2
[var_name] => part-time
[type_name] => Part Time
[is_active] => Y
[errors] => Array
(
)

)

)


Can you please let me know what i'm doing wrong..

i wont to turn php array into smarty checkbox or dropdown ....

please help

thank you.

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
you need to read out the data from the objects to a normal array and assign that array to your smarty object.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall