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
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
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
I have a bunch of records in a DB that look like
id | parent_id
--
1 | 4
2 | 4
3 | 2
4 | 0
5 | 2
6 | 1
7 | 3
8 | 7
9 | 7
I want to build a big has that looks like:
4 - 1 - 6
- 2 - 3 - 7 - 9
- 5 - 8
I'm like 90% of the way there, but I can't get my recursive
On 23/06/2011, at 9:53 AM, Scott Baker wrote:
I have a bunch of records in a DB that look like
id | parent_id
--
1 | 4
2 | 4
3 | 2
4 | 0
5 | 2
6 | 1
7 | 3
8 | 7
9 | 7
I want to build a big has that looks like:
4 - 1 - 6
- 2 - 3 - 7 - 9
- 5 -
On 23/06/2011, at 9:57 AM, Simon J Welsh wrote:
On 23/06/2011, at 9:53 AM, Scott Baker wrote:
I have a bunch of records in a DB that look like
id | parent_id
--
1 | 4
2 | 4
3 | 2
4 | 0
5 | 2
6 | 1
7 | 3
8 | 7
9 | 7
I want to build a big has that looks
On 06/22/2011 03:06 PM, Simon J Welsh wrote:
On further inspection, that's not the problem at all. The problem's around
assign_children($pid,$list,$new);
The previous line you defined $new with $new = $leaf[$pid], *copying* that
node into $new. Thus the assign_children() call updates $new,
On 23/06/2011, at 10:14 AM, Scott Baker wrote:
On 06/22/2011 03:06 PM, Simon J Welsh wrote:
On further inspection, that's not the problem at all. The problem's around
assign_children($pid,$list,$new);
The previous line you defined $new with $new = $leaf[$pid], *copying* that
node into
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);
Aha... that was it! Thanks!
--
Scott Baker - Canby Telcom
System Administrator - RHCE - 503.266.8253
--
PHP General
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
10 matches
Mail list logo