VocabReminder
Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

Convert Array to Object in PHP

       

function array2obj($data) {
    return is_array($data) ? (object) array_map(__FUNCTION__,$data) : $data;
}

Source: http://www.serversidemagazine.com/php/how-to-convert-array-notation-to-object-notation

Tagged w/ #php #programming