Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I still don't see why the single : would not have worked?


Because a single colon is used in an alternative if/else/foreach etc syntax:

  <?php if($var == true): ?>  
  Hello world  
  <?php else: ?>  
  Cake is a lie  
  <?php endif; ?>
Edit: syntax


It's also used in the ternary operator

  x = condition ? if_true : if_false;


stun taken - I seriously had forgotten about that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: