coolnix 개인블로그 - 리눅스, PHP, AWS,워드프레스 정보

태그: switch case

PHP if문 짧게쓰기

PHP if문 짧게쓰기

<?php if ($username == ‘sally’): ?> <h3>Hi Sally</h3> <?php elseif ($username == ‘joe’): ?> <h3>Hi Joe</h3> <?php else: ?> <h3>Hi unknown user</h3> <?php endif; ?>   ($m%2==0)?$bgn=”ffffff”:$bgn=”ccceee”; Switch Case VS IF문 http://kldp.org/node/62262 http://en.wikipedia.org/wiki/Duff%27s_device