I have this array which I would like to get the individual values of each item:
This is the result of print_r($theme_option):
Array ( [side_bars] => Array ( [0] => Array ( [title] => Left Page Sidebar [sort] => 0 ) [1] => Array ( [title] => Right Page Sidebar [sort] => ) [2] => Array ( [title] => Left Blog Sidebar [sort] => ) [3] => Array ( [title] => Right Blog Sidebar [sort] => ) )
I can get at a single sidebar name by using:
$theme_option['side_bars'][0]['title'];
I tried to loop through and get the individual sidebars using this code but it doesn't return as expected.
global $theme_option;
if(isset($theme_option['side_bars']) && is_array($theme_option['side_bars'])){
foreach ($theme_option['side_bars'] as $key => $value) {
$theme_side_bars["$key"] = "$value";
}
}
What I ant to try and do is get the value of each "Sidebar" and place the "title" into a dropdown box.
Thanks