1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +02:00

Create single column foreign key in table structure

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@778 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-02 22:37:10 +00:00
parent ab6d105b28
commit ced9de9d29
8 changed files with 92 additions and 19 deletions

View File

@@ -19,8 +19,8 @@ function optionlist($options, $selected = null) {
if (is_array($v)) {
$return .= '<optgroup label="' . htmlspecialchars($k) . '">';
}
foreach ((is_array($v) ? $v : array($v)) as $val) {
$return .= '<option' . ($val === $selected ? ' selected="selected"' : '') . '>' . htmlspecialchars($val) . '</option>';
foreach ((is_array($v) ? $v : array($k => $v)) as $key => $val) {
$return .= '<option' . (is_string($key) ? ' value="' . htmlspecialchars($key) . '"' : '') . ((is_string($key) ? $key : $val) === $selected ? ' selected="selected"' : '') . '>' . htmlspecialchars($val) . '</option>';
}
if (is_array($v)) {
$return .= '</optgroup>';