codeigniter - Converting arrays in php -



codeigniter - Converting arrays in php -

how convert array this:

array ( [0] => dog [1] => cat [2] => goat [3] => pig [4] => gorilla )

into this:

array(array('dog'), array('cat'), array('goat'), array('gorilla'));

i'm trying started codeigniter's table class , needs format 1 above work.

foreach($array $item) { $result[] = array($item); }

php codeigniter

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -