This is a discussion on Removing Arrays With Certain Keys From Larger Array within the PHP General forums, part of the PHP Programming Forums category; I have an array exampled below. I want to remove and use certain nested arrays from the larger array where ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have an array exampled below. I want to remove and use certain nested
arrays from the larger array where the key == title, size, day, etc... How does an idiot like myself accomplish this? Array ( [0] => Array ( [0] => title [1] => by Month for Melvin ) [1] => Array ( [0] => Jan-99 [1] => 5286.69 [2] => 4687.89 [3] => 88.71 [4] => 98.05 [5] => 9.04 ) ) |
|
|||
|
At 7/8/2003 02:18 PM, jwulff wrote:
> I have an array exampled below. I want to remove and use certain nested > arrays from the larger array where the key == title, size, day, etc... How > does an idiot like myself accomplish this? You can reference it the same as you reference any other array. For example, you used "print_r" to display the sample array, to print a sub array you do the same thing: print_r($myArray[0]); That'll print the array under the "0" key. If you wanted element 1 of the array under key 0, then you'd do something like $myValue = $myArray[0][1]; Hope this helps. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: skeller@healthtvchannel.org Web: www.healthtvchannel.org |
![]() |
| Thread Tools | |
| Display Modes | |
|
|