From 55f5f8f6f9160eb3460e6edbb641954864171f19 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 15 Jan 2019 11:03:26 -0500 Subject: [PATCH] fixing errors in code --- API.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/API.md b/API.md index 39430fc..2b3872a 100644 --- a/API.md +++ b/API.md @@ -259,7 +259,7 @@ class People { //query the database $results = pg_query("SELECT * FROM people"); - $row_object = pg_fetch_object($results) + $row_object = pg_fetch_object($results); while($row_object){ var_dump($row_object); $row_object = pg_fetch_object($results); @@ -284,13 +284,13 @@ class People { //query the database $results = pg_query("SELECT * FROM people"); - $row_object = pg_fetch_object($results) + $row_object = pg_fetch_object($results); while($row_object){ $new_person = new Person( //create a new person $row_object->id, $row_object->name, - $row_object->age, + $row_object->age ); $people[] = $new_person; //push new person object onto $people array @@ -308,6 +308,6 @@ One thing you might notice is that the `id` and `age` values for each person are $new_person = new Person( intval($row_object->id), $row_object->name, - intval($row_object->age), + intval($row_object->age) ); ```