|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
livingdead Smarty Rookie
Joined: 08 Oct 2003 Posts: 9
|
Posted: Wed Oct 08, 2003 2:22 pm Post subject: function join with smarty - very urgent |
|
|
How can I do join with smarty
thanks for your helps
Livingdead |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Oct 08, 2003 3:28 pm Post subject: |
|
|
you mean php's join?
{','|join:$var}
with $smarty->security=false (the default) you can use any php-function as a modifier.
if you don't like the strange order of parameter above you have to write a modifier-plugin as a wrapper:
modifier.join.php
[php:1:63627a1f22]
function smarty_modifier_join($array, $delimiter) {
return join($delimiter, $array);
}
[/php:1:63627a1f22]
then you can do
{$var|join:','}
HTH
messju |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Oct 08, 2003 6:39 pm Post subject: |
|
|
Why do I get the sinking feeling that SQL join is meant? In which case, the answer is: you don't. |
|
Back to top |
|
livingdead Smarty Rookie
Joined: 08 Oct 2003 Posts: 9
|
Posted: Tue Oct 21, 2003 9:15 am Post subject: |
|
|
thanks for your reply, sorry for mylate to be back, but I did other thinks, in waiting.
What is permited if you leave $smarty->security = true;
Which sort of hacking is possible
Thanks for your help
Livingdead |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|