![]() |
Generic foreach array key question I've been looking for examples of this but haven't found one that's clear to me. I have a simple array of arrays: $race = array( "race1" => array("Date 1", "Town 1"), "race2" => array("Date 2", "Town 2") ); I want a foreach loop that will yield the key and a specific value for a dropdown menu: Code: Town 1 Town 2 So if I wanted to pull out "race1, Town 1" and "race2, Town 2" how do I do that? I know it's got to be simple but I can't find it. I'm playing with array_keys($race) as $row which gets me the key but I have no idea how to get the specific value. I tried using that key to just call it from the array but my syntax must have been wrong; I used $race['$row'][1]. |
الساعة الآن 08:37 AM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir