[ create a new paste ] login | about

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

PHP, pasted on Jul 25:
1
2
3
4
5
<?php

    $str = "Joe Bloggs";
    list($arr['first_name'], $arr['last_name']) = explode(" ", $str);
    print_r($arr);


Output:
1
2
3
4
5
Array
(
    [last_name] => Bloggs
    [first_name] => Joe
)


Create a new paste based on this one


Comments: