I have this array which gets the last table from a database. However the index contains an object and not just a string.
I need to implement some string manipulation from below to get only the part table15
Array
(
[0] => stdClass Object
(
[table_name] => table15
[create_time] => 2009-11-24 13:10:04
)
)
Any suggestions?
EDIT:
I am using ExtJs and I am a bit confused. This array is being generated from the following PDO code:
$sql = "SELECT table_name, create_time FROM information_schema.TABLES WHERE table_schema = 'database_name' ORDER BY CREATE_TIME desc LIMIT 1";
$ostmt = $this->odb->query($sql);
return $ostmt->fetchAll(PDO::FETCH_OBJ);
This returns the array printed above. I don't know the name of the array since it is being generated like this...
Any other ideas?
Many thanks.