Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
|
BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
This is the forum to discuss the Wrox book Professional PHP5 by Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove; ISBN: 9780764572821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 10th, 2006, 07:52 AM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default could you explain me two lines in chapter 7 thanks

within (function PopulateObjectArray)in class.GenericObjectCollection.php

$refObjArrayIndexObj = &$this->obj_array[$this_index];
i don't know what is the value of $refObjArrayIndexObj, because in this line
is the first time where $this->obj_array is used,
and i don't get the line where is asigned something to
$this->obj_array = (like this)
so i can't understand what is holding $refObjArrayIndexObj

following the code there is another line in (function RetrievePopulatedObjects)
$return_array[$counter] = $this->obj_array[$i];
and then
return($return_array);
but if $this->obj_array was never assigned with something,
the value of $return_array will be?.

Thank you, and congratulations.

complementing my question, i ask for this two lines because when i run the code
$uh= new UserHome();
$arUsers= $uh->GetallUsersWithFirstNameBeginningWith('l');
for ($i=0;i<=sizeof($arUsers)-1;$i++){
    print " " .$arUsers[$i]->GetField("last_name") . " " .
          $arUsers[$i]->GetField("first_name") . " " .
          $arUsers[$i]->GetField("username"). "<br/>\n";
};

i get the following error after i get the desired return.
john Doe
Jane Doe
Fatal error: Call to a member function GetField() on a non-object in C:\Apache2\Pruebas\ProPHP5\ch07\testuserhome.php on line 7
the error is referring to
$arUsers which is receiving the value from $return_array which implies obj_array





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone explain this code to me pandu345 Java Basics 2 October 6th, 2006 12:25 PM
could any one explain this code for me ? method Access VBA 1 August 13th, 2005 02:02 AM
explain please rein Javascript 3 January 31st, 2005 09:47 AM
Could somebody explain this to me, please? czambran BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 June 7th, 2004 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.