Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Array als ["a","b"] Ausgeben

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
SheppardX
Smarty n00b


Joined: 22 Sep 2015
Posts: 2

PostPosted: Tue Sep 22, 2015 10:24 am    Post subject: Array als ["a","b"] Ausgeben Reply with quote

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
View user's profile Send private message
ChrisFah
Smarty Pro


Joined: 02 Nov 2009
Posts: 159
Location: Traun, Austria

PostPosted: Mon Nov 09, 2015 5:45 pm    Post subject: Reply with quote

foreach($array as $x) {
$temp[] = '"'.$x.'"';
}
$result = implode(',', $temp);
Back to top
View user's profile Send private message
danbru1211
Smarty Rookie


Joined: 15 Jul 2014
Posts: 9
Location: Austria, Graz

PostPosted: Tue Nov 24, 2015 1:30 pm    Post subject: Reply with quote

Würde dir sonst noch
Code:
json_encode
empfehlen.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP