Use mysql_fetch_assoc
instead of mysql_fetch_row
.
GetRowFromDb("`id`,`name`,`email`", " WHERE `id`='1'", "database1", "table1");
function GetRowFromDb ($column, $condition, $database, $table) {
$target="`$database`.`$table`";
$query="SELECT $column FROM $target $condition";
$indexedrow=mysql_fetch_assoc(mysql_query($query));
return $indexedrow;
}
solved Get PHP associative array from MySQL