optimization - How to optimize the following smarty code so that the iterations performed for comparing array values get reduce? -
I am a newbie for a smart template engine. I am comparing two arrays to my template with a smart template:
The above code is working fine for me but if you are not close There is a large number in the number of iterations done in comparison to array values.
Therefore, to reduce the number of iterations, I want to customize the above code. Can someone who can keep a good command on Smerty can provide a way to optimize the above code?
Maybe you are
{foreach = $ all_states item = state Key = key}. & Lt; Option value = "{$ state.id}" {if $ state.id | In_array: $ data .applicable_states} selected = "selected" {/ if} & gt; {$ State.state_name} & lt; / Options & gt; {/ Foreach}
Comments
Post a Comment