I wanted to know how can I fetch records from an array with different object keys in php?
Here is my array output result:
Array
(
[0] => Array
(
[0] => Alpha Project
[name] => Alpha Project
)
[1] => Array
(
[0] => Bravo Project
[name] => Bravo Project
)
)
Please note that I am using ADODB database class in my project. This is the sample code of ADODB for populating results:
<?php
include('adodb/adodb.inc.php');
$server = 'localhost'; $user = 'root'; $password = ''; $database = 'some_database'; $driver = 'mysql';
$db = ADONewConnection($driver);
$db->debug = true;
$db->Connect($server, $user, $password, $database);
$result = $db->Execute('SELECT `name` FROM project;');
print "<pre>";
print_r($result->GetRows());
print "</pre>";
?>