I'm doing some database query and I want a automatic system but I encounter this when getting the list of tables with the query.
SHOW TABLES ;
Using Php to get this function returns the array of tables now just the values like Person. It is posible to get only the result?
$rows = Array();
while($row = mysql_fetch_array($result)){
array_push($rows, $row);
}
echo json_encode($rows);
Result
[{"0":"Company","Tables_in_database":"Company"},{"0":"Education","Tables_in_database":"Education"},{"0":"Health","Tables_in_database":"Health"},{"0":"Person","Tables_in_database":"Person"},{"0":"Personal","Tables_in_database":"Personal"},{"0":"Skill","Tables_in_database":"Skill"}]
I only want the values: Company, Education, Health, ETC.