ChrisB: In ein echo eine if anweisung verbauen?

Beitrag lesen

Hi,

ich möchte gerne in einem echo eine if Anweisung einbauen.

echo"<option".if($tarife['tarifname'] == $grund2['tarifname'])echo" selected".">".$tarife['tarifname']."</option>"

echo "<option".([link:http://www.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary@title=$tarife['tarifname'\] == $grund2['tarifname'\] ? " selected" : ""]).">".$tarife['tarifname']."</option>";

MfG ChrisB

--
Light travels faster than sound - that's why most people appear bright until you hear them speak.