|
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 |
SheppardX Smarty n00b
Joined: 22 Sep 2015 Posts: 2
|
Posted: Tue Sep 22, 2015 10:24 am Post subject: Array als ["a","b"] Ausgeben |
|
|
Hey wie schon im Betreff steht möchte ich gerne ein übergebenes Array in folgender notation ausgeben ["a","b"] wie kann ich das machen ? übergeben bekomme ich
Array
(
[0] =>a
[1] =>b
[2] => c
[3] => d
)
LG |
|
Back to top |
|
ChrisFah Smarty Pro
Joined: 02 Nov 2009 Posts: 159 Location: Traun, Austria
|
Posted: Mon Nov 09, 2015 5:45 pm Post subject: |
|
|
foreach($array as $x) {
$temp[] = '"'.$x.'"';
}
$result = implode(',', $temp); |
|
Back to top |
|
danbru1211 Smarty Rookie
Joined: 15 Jul 2014 Posts: 9 Location: Austria, Graz
|
Posted: Tue Nov 24, 2015 1:30 pm Post subject: |
|
|
Würde dir sonst noch empfehlen. |
|
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
|