On May 3, 2007, at 10:57 PM, Joseph Crawford wrote:
The main reason is that the default array is created
by reading a YAML file.
Cool... I figured something like that was going on. Doesn't totally
mean you can read the YAML file into class properties... but whatever
works. The Zend_Config c
Sorry about that email everyone.
Sent via BlackBerry from Cingular Wireless
-Original Message-
From: "Joseph Crawford" <[EMAIL PROTECTED]>
Date: Thu, 3 May 2007 22:57:12
To:"NYPHP Talk"
Subject: Re: [nyphp-talk] Overriding Array's
Rob,
Thanks for y
Like really sad.
Sent via BlackBerry from Cingular Wireless
-Original Message-
From: "Joseph Crawford" <[EMAIL PROTECTED]>
Date: Thu, 3 May 2007 22:57:12
To:"NYPHP Talk"
Subject: Re: [nyphp-talk] Overriding Array's
Rob,
Thanks for your code examp
Rob,
Thanks for your code example however having them as class properties
will not work. The main reason is that the default array is created
by reading a YAML file. The array is populated by reading a section
of a flat file and then it reads a section specific to the current
page (if any) and
On May 2, 2007, at 1:52 PM, Joseph Crawford wrote:
We are looking to have the second array override the first array
values. I cannot seem to get any of these methods to
work.
I assume you've fixed this by now... but here's a recursive method
that I think does what you want:
// overrides no
Are you sure you need to even do the loop?
Why not always array_unshift() the $links array ...
array_unshift() prepends passed elements to the front of the array.
Note that the list of elements is prepended as a whole, so that the
prepended elements stay in the same order. All numerical arra
ok let me try to clarify myself.
I somehow need to loop over all elements and see if any of them
contain numeric indexes like the stylesheets does. If it does we need
to add the new element from the secondary array to the first.
If it get's to the bottom element (without finding a numeric key
f
This will not work, hence if we have the following
Array
(
links => Array
(
stylesheets => Array
(
[0] => style.css,
[1] => layout.css
)
)
)
Array
(
links => Array
(
stylesheets => Array
(
[0] => general.css
)
)
)
we would want the end result to add the va
Guys I have 2 arrays the structures will be similar, for instance here
is a chopped down version
Array
(
[http_metas] => Array
(
[content-type] => text/html; charset=utf-8
[content-language] => en-us
)
[metas] => Array
(
[PreventParsing