Re: IIF
| From: | Horacio Degiorgi | Date: | Wed, 14 May 2003 08:49:48 +0000 |
| Subject: | Re: IIF | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-36185@lists.php.net to get a copy of this message | ||
Rafael Montagud wrote:
echo "<option>" . $valor . " " .($valor==$variable) ? "selected" : "" . "</option>"; HoraciodSería hacer algo como esto: ----- echo "<option>" . $valor . " " . iif($valor==$variable,"selected","") . "</option>"; -----Tu pregunta tiene una respuesta rápida, el equivalente a ese iif() sería algo como esto: echo "<option>" . $valor . " " .($valor==$variable ? "selected") . "</option>"; no sería así