0
我看了官方文檔,但我仍然無法訪問自變量,例如「城市」。在sql查詢之後,我使用$ results [0]來獲取它。我怎樣才能訪問「城市」?從MySQL查詢結果數組中訪問信息?
$results = DB::table('users')->get();
birthdate = "0000-00-00 00:00:00";
city = "Laguna Hills";
country = "<null>";
"created_at" = "2014-07-21 07:11:06";
email = "[email protected]";
id = 1;
"is_verified" = "<null>";
"location_lat" = "<null>";
"location_lon" = "<null>";
password = RightNow25;
"updated_at" = "0000-00-00 00:00:00";
username = sammy0;
zip = "<null>";
$ results [0] ['city']? – t3chguy