|
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 |
noway Smarty n00b
Joined: 15 May 2016 Posts: 2
|
Posted: Sun May 15, 2016 8:05 am Post subject: Mehrdimensionales Array |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun May 15, 2016 11:10 am Post subject: |
|
|
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 |
|
noway Smarty n00b
Joined: 15 May 2016 Posts: 2
|
Posted: Sun May 15, 2016 11:17 am Post subject: |
|
|
Hej super besten Dank.
Lag garnicht so falsch.. |
|
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
|