Advertisement
snake5

SGScript - foreach

Apr 21st, 2013
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.18 KB | None | 0 0
  1. arr = ['huh','what','why'];
  2.  
  3. // value
  4. foreach( a : arr )
  5.     println( a );
  6.  
  7. // key/value
  8. foreach( a,b : arr )
  9.     println( a, " = ", b );
  10.  
  11. // key
  12. foreach( a, : arr )
  13.     println( a );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement