PHP: mehrfache action-Anweisung über switch and case
Montag, 26. März 2007, 20:42
hallo mog
mal eine kleine frage
ich hab hier mehrere action-Anweisungen und würd gern wissen, wie ich das in eine switch and case-php-form fassen bzw. wie der ausgabecode aussehen kann?
hab mir zwar schon einige der wbb.php´s angeguckt, aber die sind irgendwie alle nochmal geschachtel -> also die mehrere $ in einer funktion enthalten
mal eine kleine frage
ich hab hier mehrere action-Anweisungen und würd gern wissen, wie ich das in eine switch and case-php-form fassen bzw. wie der ausgabecode aussehen kann?
hab mir zwar schon einige der wbb.php´s angeguckt, aber die sind irgendwie alle nochmal geschachtel -> also die mehrere $ in einer funktion enthalten
Quellcode
- aktivierung in tpl
- <a href="portal.php?portalinfo=1">1</a>
- <a href="portal.php?portalinfo=2">1</a>
- <a href="portal.php?portalinfo=3">1</a>
- php-code
- if ($portalinfo=="") { $text = "Ausgangsinfotext"; }
- if ($portalinfo=="1") { $text = "1 Infotext"; }
- if ($portalinfo=="2") { $text = "2 Infotext"; }
- if ($portalinfo=="3") { $text = "3 Infotext"; }
- ausgabecode in tpl
- <if($portalinfo=="")><then>$text</then></if>
- <if($portalinfo=="1")><then>$text</then></if>
- <if($portalinfo=="2")><then>$text</then></if>
- <if($portalinfo=="3")><then>$text</then></if>
aktivierung in tpl
<a href="portal.php?portalinfo=1">1</a>
<a href="portal.php?portalinfo=2">1</a>
<a href="portal.php?portalinfo=3">1</a>
php-code
if ($portalinfo=="") { $text = "Ausgangsinfotext"; }
if ($portalinfo=="1") { $text = "1 Infotext"; }
if ($portalinfo=="2") { $text = "2 Infotext"; }
if ($portalinfo=="3") { $text = "3 Infotext"; }
ausgabecode in tpl
<if($portalinfo=="")><then>$text</then></if>
<if($portalinfo=="1")><then>$text</then></if>
<if($portalinfo=="2")><then>$text</then></if>
<if($portalinfo=="3")><then>$text</then></if>
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Ark« (26. März 2007, 20:47)