Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi,

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?

Thanks,

Marco

Share this post


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).

Share this post


Link to post
Share on other sites

Thank you so much Larry, I really got lost, but now it is clear. :D

Also thanks for you early reply.

Edited by Marco

Share this post


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.

Guest
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.

Loading...

×
×
  • Create New...