Re: [Phplib-users] array und if()
Brought to you by:
nhruby,
richardarcher
|
From: nathan r. h. <na...@ds...> - 2002-04-01 22:52:56
|
On Mon, 1 Apr 2002, Marek Siegle wrote:
> wie kann ich in den Mittelteil ein if() einbauen?
> ohne das es mit den Klammern Probleme gibt.
> Gruss,
> MAREK.
>
>
> for($i=3D0; $i<10; $i++) {
> $tpl-> set_var ( array (
>
>
> if($i =3D=3D $page) {
> "menue" =3D> "<b>Men=FC ".$i."</b>",
> }
> else {
> "menue" =3D> "Men=FC ".$i."",
> }
>
>
> "href" =3D> $PHP_SELF."?page=3D".$i
> ));
>
for($i=3D0; $i<10; $i++) {
if ($i =3D=3D $page) {
$tpl->set_var('menue', '<b>Men?</b>');
} else {
$tpl->set_var('menue', 'Men?');
}
$tpl->set_var('href', $PHP_SELF . 'page=3D' . $i);
}
(not the best way.. but your question lacks the context of the rest of the
code it lives in. and you're speaking german which I don't understand :)
-n
------
nathan hruby
na...@ds...
------
|