Re: Create a hierarchical hash from flat source

From: Date: Thu, 23 Jun 2011 19:47:29 +0000
Subject: Re: Create a hierarchical hash from flat source
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-313691@lists.php.net to get a copy of this message
On Thu, Jun 23, 2011 at 01:57:24PM -0400, Robert Cummings wrote: > On 11-06-23 12:54 PM, Tamara Temple wrote: > > > >On Jun 22, 2011, at 5:24 PM, Scott Baker wrote: > > > >>On 06/22/2011 03:17 PM, Simon J Welsh wrote: > >>>You still need to pass the value by reference to assign_children(), > >>>so: > >>>$new =&$leaf[$pid]; > >>>assign_children($pid,$list,&$new); > >> > >>One last thing I fixed was that PHP was complaining that run-time pass > >>by reference was deprecated. I changed assign_children to be > >> > >>function assign_children($id,$list,&$leaf) > >> > >>Which solved that also! > > > >Ah, pointers, how we love them. The bane of every CS undergrad. > > Bane? I thought they were elegant :) The way you know they're *not* elegant is that hardly any language since C has included them. We worship at the alter of languages with garbage collection. ;-} Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com

« previous php.general (#313691) next »