array( '0' => array ('id'=>'1', 'text'=>'Axpo Super League', '1' => array ( 'id' => '2', 'text' => 'Challenge League' ), '2' => array ( 'id' => '3' ,'text' => '1. LIGA' ), '3' => array ( 'id' => '4', 'text' => 'AMATEUR LIGA' ), '4' => array ( 'id' => '5', 'text' => 'REGIONALVERBAENDE' ), '5' => array ( 'id' => '6', 'text' => '1. LIGA' ), ), //Axpo Super League '1' => array ( '10' => array ( 'id' => '10', 'text' => 'BSC Young Boys' ), '11' => array ( 'id' => '11', 'text' => 'FC St. Gallen' ), '12' => array ( 'id' => '12', 'text' => 'FC Zürich' ), '13' => array ( 'id' => '13', 'text' => 'FC Luzern' ), '14' => array ( 'id' => '14', 'text' => 'Neuchâtel Xamax FC' ), '15' => array ( 'id' => '15', 'text' => 'FC Basel 1893 ' ), '16' => array ( 'id' => '16', 'text' => 'FC Sion' ), '17' => array ( 'id' => '17', 'text' => 'Grasshopper Club Zürich' ), '18' => array ( 'id' => '18', 'text' => 'AC Bellinzona' ), '19' => array ( 'id' => '19', 'text' => 'FC Aarau' ), ), //Challenge League '2' => array ( '20' => array ( 'id' => '20', 'text' => 'FC Lugano' ), '21' => array ( 'id' => '21', 'text' => 'FC Winterthur' ), '22' => array ( 'id' => '22', 'text' => 'Yverdon-Sport FC' ), '23' => array ( 'id' => '23', 'text' => 'FC Thun' ), '24' => array ( 'id' => '24', 'text' => 'FC Vaduz' ), '25' => array ( 'id' => '25', 'text' => 'FC Lausanne-Sport' ), '26' => array ( 'id' => '26', 'text' => 'FC Biel-Bienne' ), '27' => array ( 'id' => '27', 'text' => 'FC Locarno' ), '28' => array ( 'id' => '28', 'text' => 'SC Kriens' ), '29' => array ( 'id' => '29', 'text' => 'Servette FC' ), '30' => array ( 'id' => '30', 'text' => 'FC Wohlen' ), '31' => array ( 'id' => '31', 'text' => 'FC Wil 1900' ), '32' => array ( 'id' => '32', 'text' => 'FC Le Mont LS' ), '33' => array ( 'id' => '33', 'text' => 'FC Schaffhausen' ), '34' => array ( 'id' => '34', 'text' => 'Stade Nyonnais' ), '35' => array ( 'id' => '35', 'text' => 'FC Gossau' ), ), //1. LIGA '3' => array ( '30' => array ( 'id' => '30', 'text' => 'Gruppe 1' ), '31' => array ( 'id' => '31', 'text' => 'Gruppe 2' ), '32' => array ( 'id' => '32', 'text' => 'Gruppe 3' ), ), //1. LIGA Gruppe 1 '30' => array ( '300' => array ( 'id' => '300', 'text' => 'Grand-Lancy' ), '301' => array ( 'id' => '301', 'text' => 'Echallens' ), '302' => array ( 'id' => '302', 'text' => 'Sion' ), '303' => array ( 'id' => '303', 'text' => 'Chênois' ), '304' => array ( 'id' => '304', 'text' => 'Martigny-Sports' ), '305' => array ( 'id' => '305', 'text' => 'Fribourg' ), '306' => array ( 'id' => '306', 'text' => 'YB' ), '307' => array ( 'id' => '307', 'text' => 'Bavois' ), '308' => array ( 'id' => '308', 'text' => 'Düdingen' ), '309' => array ( 'id' => '309', 'text' => 'Bulle' ), '3010' => array ( 'id' => '3010', 'text' => 'Malley' ), '3011' => array ( 'id' => '3011', 'text' => 'Meyrin' ), '3012' => array ( 'id' => '3012', 'text' => 'Naters' ), '3013' => array ( 'id' => '3013', 'text' => 'UGS Genève' ), '3014' => array ( 'id' => '3014', 'text' => 'Etoile Carouge' ), '3015' => array ( 'id' => '3015', 'text' => 'Baulmes' ), ), //1. LIGA Gruppe 2 '31' => array ( '310' => array ( 'id' => '310', 'text' => 'GC' ), '311' => array ( 'id' => '311', 'text' => 'Basel 1893' ), '312' => array ( 'id' => '312', 'text' => 'Grenchen' ), '313' => array ( 'id' => '313', 'text' => 'Zürich' ), '314' => array ( 'id' => '314', 'text' => 'Delémont' ), '315' => array ( 'id' => '315', 'text' => 'SV Schaffhausen' ), '316' => array ( 'id' => '316', 'text' => 'Höngg' ), '317' => array ( 'id' => '317', 'text' => 'YF Juventus' ), '318' => array ( 'id' => '318', 'text' => 'Wangen b.O' ), '319' => array ( 'id' => '319', 'text' => 'Laufen' ), '3110' => array ( 'id' => '3110', 'text' => 'Muttenz' ), '3111' => array ( 'id' => '3111', 'text' => 'Breitenrain' ), '3112' => array ( 'id' => '3112', 'text' => 'Münsingen' ), '3113' => array ( 'id' => '3113', 'text' => 'Solothurn' ), '3114' => array ( 'id' => '3114', 'text' => 'Winterthur' ), '3115' => array ( 'id' => '3115', 'text' => 'Old Boys' ), ), //1. LIGA Gruppe 3 '32' => array ( '320' => array ( 'id' => '320', 'text' => 'Cham' ), '321' => array ( 'id' => '321', 'text' => 'Zug 94' ), '322' => array ( 'id' => '322', 'text' => 'Chiasso' ), '323' => array ( 'id' => '323', 'text' => 'Tuggen' ), '324' => array ( 'id' => '324', 'text' => 'Baden' ), '325' => array ( 'id' => '325', 'text' => 'Zofingen' ), '326' => array ( 'id' => '326', 'text' => 'Chur' ), '327' => array ( 'id' => '327', 'text' => 'Emmenbrücke' ), '328' => array ( 'id' => '328', 'text' => 'St. Gallen' ), '329' => array ( 'id' => '329', 'text' => 'Mendrisio-Stabio' ), '3210' => array ( 'id' => '3210', 'text' => 'Schötz' ), '3211' => array ( 'id' => '3211', 'text' => 'Luzern' ), '3212' => array ( 'id' => '3212', 'text' => 'Lugano' ), '3213' => array ( 'id' => '3213', 'text' => 'Eschen/Mauren' ), '3214' => array ( 'id' => '3214', 'text' => 'Rapperswil-Jona' ), '3215' => array ( 'id' => '3215', 'text' => 'Biaschesi' ), ) )); // access the childs with its parent index $return = $data[$id]; echo json_encode($return); ?>