My var_dump is returning this:
array(5) {
["radioinput"]=> string(12) "sidebar-left"
["option1"]=> int(0)
["sometext"]=> string(0) ""
["selectinput"]=> NULL
["sometextarea"]=> string(0) ""
}
I'm having problems acting on the "radioinput" array.
If it's "sidebar-left" I want it to echo:
<body class="sidebar-left">
If it's "sidebar-right" I want it to echo:
<body class="sidebar-left">
If it's "two-sidebars" I want it to echo:
<body class="two-sidebars">
If it's blank I want it to echo:
<body class="sidebar-left">
My questions is, how can I get my code to do this?
<?php
if (radioinput('sidebar-left')) {
echo '<body class="sidebar-left">';
} elseif (radioinput('sidebar-right')) {
echo '<body class="sidebar-right">';
} elseif (radioinput('two-sidebars')) {
echo '<body class="two-sidebars">';
} else {
echo '<body class="sidebar-left">';
}
?>
$x["radioinput"]is not an array. It is a string. It says so right there in the dump. And you didn't tell us what$xreally is. What's wrong with basic==conditionals?