Jump to content
Larry Ullman's Book Forums

Recommended Posts


in PHP Advanced, 3rd edition, script 9.8, pages 306-7, step 3 - "Fetch the results and display them",

Larry says that the loop creates a new Page object - $page - that can be invoked by the Page class methods.

I don’t understand how and where the new Page object - $page - gets created, as I cannot find a new keyword.

Could you please help me?



Link to post
Share on other sites

Hey Marco,


Sorry for the confusion! Line 20 sets the fetch mode to fetch records as objects of type Page. So the while loop assigns each row to the $page variable which is then an object of type Page (because of the fetch mode).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...