Array ( [0] => image_name|Image Name (extension not required)|text|20|0||0 [1] => album|Album (image directory)|dropdown||0|albumArray|0 [2] => keywords|Keyword(s)|text|20|0||0 [3] => persons|Person(s)|text|20|0||0 [4] => events|Event(s)|text|20|0||0 [5] => image_alt|Image Caption (that appears as "alt" tag text in <img src> tag)|text|20|0||0 [6] => image_creation_start_date|Image Creation Start Date|dateGroup||0|imageCreationStartHTML|0 [7] => image_creation_end_date|Image Creation End Date|dateGroup||0|imageCreationEndHTML|0 [8] => image_location_city|Image Location: City|text|20|0||0 [9] => image_location_state|State|dropdown||0|stateArray|0 [10] => image_location_country|Country|dropdown||0|countryArray|1 )
Array ( [10] => image_location_country|Country|dropdown||0|countryArray|1 [9] => image_location_state|State|dropdown||0|stateArray|0 [8] => image_location_city|Image Location: City|text|20|0||0 [7] => image_creation_end_date|Image Creation End Date|dateGroup||0|imageCreationEndHTML|0 [6] => image_creation_start_date|Image Creation Start Date|dateGroup||0|imageCreationStartHTML|0 [5] => image_alt|Image Caption (that appears as "alt" tag text in <img src> tag)|text|20|0||0 [4] => events|Event(s)|text|20|0||0 [3] => persons|Person(s)|text|20|0||0 [2] => keywords|Keyword(s)|text|20|0||0 [1] => album|Album (image directory)|dropdown||0|albumArray|0 [0] => image_name|Image Name (extension not required)|text|20|0||0 )
Array ( [0] => image_location_country|Country|dropdown||0|countryArray|1 [1] => image_location_state|State|dropdown||0|stateArray|0 [2] => image_location_city|Image Location: City|text|20|0||0 [3] => image_creation_end_date|Image Creation End Date|dateGroup||0|imageCreationEndHTML|0 [4] => image_creation_start_date|Image Creation Start Date|dateGroup||0|imageCreationStartHTML|0 [5] => image_alt|Image Caption (that appears as "alt" tag text in <img src> tag)|text|20|0||0 [6] => events|Event(s)|text|20|0||0 [7] => persons|Person(s)|text|20|0||0 [8] => keywords|Keyword(s)|text|20|0||0 [9] => album|Album (image directory)|dropdown||0|albumArray|0 [10] => image_name|Image Name (extension not required)|text|20|0||0 ) elementName = image_location_country
This is the code that produced the preceeding results:
print_r($this->formFieldsArray[$section]);
print_r("<P>"); print_r(@array_reverse($this->formFieldsArray[$section], true));
print_r("<P>"); print_r(@array_slice(array_reverse($this->formFieldsArray[$section], true), $kounter));
Very VERY simple problem that I can't solve: I need to get a subset of an array NOT from 0 to $kounter, but from $kounter to 0. Following is the code I TRIED to use to do so (and failed);
array_slice(array_reverse($this->formFieldsArray[$section], true), $kounter)
The following produces the following VERY incorrect result:
Array ( [0] => image_location_country|Country|dropdown||0|countryArray|1 [1] => image_location_state|State|dropdown||0|stateArray|0 [2] => image_location_city|Image Location: City|text|20|0||0 [3] => image_creation_end_date|Image Creation End Date|dateGroup||0|imageCreationEndHTML|0 [4] => image_creation_start_date|Image Creation Start Date|dateGroup||0|imageCreationStartHTML|0 [5] => image_alt|Image Caption (that appears as "alt" tag text in <img src> tag)|text|20|0||0 [6] => events|Event(s)|text|20|0||0 [7] => persons|Person(s)|text|20|0||0 [8] => keywords|Keyword(s)|text|20|0||0 [9] => album|Album (image directory)|dropdown||0|albumArray|0 [10] => image_name|Image Name (extension not required)|text|20|0||0 ) elementName = image_location_country
That is WAY off from what I want, all I want is this, if $kounter = 0:
Array ([0] => image_name|Image Name (extension not required)|text|20|0||0)
All I want is to produce an array subset, keys preserved, from $kounter to 0. How do I do that? I hope this is sufficient enough code to illustrate my problem as this literally is all the code I'm using.
Thanx
Phil