Skip to content

Instantly share code, notes, and snippets.

@chrismeller
Created December 27, 2010 19:07
Show Gist options
  • Save chrismeller/756431 to your computer and use it in GitHub Desktop.
Save chrismeller/756431 to your computer and use it in GitHub Desktop.
<?php
$results = $db->get_results( 'select name, value from options' );
$options = new stdClass();
foreach ( $results as $result ) {
$options->{$result->name} = $result->value;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment