Created
February 22, 2011 19:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array_walk_recursive($array,"typeCast"); | |
// then insert to mongo->coll->save($array) | |
function typeCast(&$item,$key){ | |
if(is_numeric($item)) $item = (float) $item; | |
else $item = (string) $item; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment