[ create a new paste ] login | about

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

PHP, pasted on Jan 4:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php


$arr = array( "name" => array( 
                      "0" => "Sorry the name is missing!", 
                      "1" => "Sorry the name is to short!" 
               )); 

if(array_key_exists('name', $arr)) {
    print_r( $arr['name'] );
} else {
    echo "array key not found";
}


?>


Output:
1
2
3
4
5
Array
(
    [0] => Sorry the name is missing!
    [1] => Sorry the name is to short!
)


Create a new paste based on this one


Comments: