Created
August 19, 2012 07:08
-
-
Save fake-or-dead/3393068 to your computer and use it in GitHub Desktop.
CI transform database re-arrange result to be array("value1", "value2")
This file contains 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
// re-arrange result to be array("value1", "value2") | |
$options = array(""); | |
foreach ($query->result_array() as $key => $value) { | |
array_push($options, $value['field_name']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment