[ create a new paste ] login | about

Link: http://codepad.org/5QYIeL4f    [ raw code | output | fork ]

PHP, pasted on May 23:
1
2
3
4
5
6
7
8
<?php
$arrTest = array('val1','val2','val3','val4');
$arrTest['lastKey'] = 'Last Key';
foreach($arrTest as $key => $val) {
  if($key === 'lastKey') {
     echo "last found";
  }
}


Output:
1
last found


Create a new paste based on this one


Comments: