[ create a new paste ] login | about

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

PHP, pasted on May 29:
1
2
3
4
5
6
7
8
9
10
<?php

$full_name = array("first: N", "last: Vidovic");
//var_dump($full_name);
foreach ($full_name as $part_name) {
    $exploded = explode(":", $part_name);
    $make_array[$exploded[0]] =  $exploded[1];
   // echo $make_array["first"]; 
}
print_r($make_array);


Output:
1
2
3
4
5
Array
(
    [first] =>  N
    [last] =>  Vidovic
)


Create a new paste based on this one


Comments: