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

Link to comment
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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...