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

You may also like

댓글 남기기