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

Mehrdimensionales Array

 
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
noway
Smarty n00b


Joined: 15 May 2016
Posts: 2

PostPosted: Sun May 15, 2016 8:05 am    Post subject: Mehrdimensionales Array Reply with quote

Hallo zusammen,

ich versuche mich etwas mit Smarty, jetzt bin ich an einen Punkt angekommen wo ich nicht weiter komme. Und zwar habe ich eine Mehrdimensionales Array diese möchte ich gern in der Tpl verarbeiten.

die array
Code:

Array
(
    [cod] => 1000
    [msg] => Command completed successfully
    [resData] => Array
        (
            [domain] => Array
                (
                    [0] => Array
                        (
                            [domain] => xyz.info
                            [avail] => 1
                            [status] => free
                            [checktime] => 132
                        )

                )

        )

    [svTRID] => 20163514-752713383
    [runtime] => 1.0537
)


jetzt wollte ich mir den status und domain ausgeben lassen.
habe es wie folgt versucht.. leider ohne erfolg.

Code:

{foreach from=$domainCheck.resData.domain.0 item=data}
{if $data.status eq 'free'}
     <p class="text-success">Wunderbar, Ihre gewählte Domain ({$data.domain}) ist verfügbar!</p>
{else}
     <p class="text-danger">Schade, Ihre gewählte Domain ({$data.domain}) ist schon vergeben.</p>
{/if}
{/foreach}


eventuell kann mir einer von euch ein tip geben.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun May 15, 2016 11:10 am    Post subject: Reply with quote

Code:
{foreach from=$domainCheck.resData.domain item=data}
{if $data.status eq 'free'}
     <p class="text-success">Wunderbar, Ihre gewählte Domain ({$data.domain}) ist verfügbar!</p>
{else}
     <p class="text-danger">Schade, Ihre gewählte Domain ({$data.domain}) ist schon vergeben.</p>
{/if}
{/foreach}
Back to top
View user's profile Send private message
noway
Smarty n00b


Joined: 15 May 2016
Posts: 2

PostPosted: Sun May 15, 2016 11:17 am    Post subject: Reply with quote

Hej super besten Dank.
Lag garnicht so falsch..
Back to top
View user's profile Send private message
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