Created
November 13, 2013 08:25
-
-
Save tanmayk/7445566 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function example_dependent_options($key) { | |
$plakalar = array(1, 2); // These are keys from parent dropdown. | |
$iller = array( | |
'1' => array( | |
'1' => 'Aladağ' | |
), | |
'2' => array( | |
'5' => 'Aşkale') | |
); | |
if (isset($iller[$key])) { | |
return $iller[$key]; | |
} | |
return array(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment