views:

40

answers:

2

Here's a quickie for the pros:

How do I display Value 1, 2, 3 etc as it's in it's third array?

$meta_boxes = array

  (
        "checkbox" => array
        (
              "name" => "checkbox",
              "title" => "",
              "description" => "This is an example of a checkbox field.",
              "type" => "checkbox",
              "rows" => "",
              "width" => "",
              "options" => array
              (
                    "1" => "Value 1",
                    "2" => "Value 2",
                    "3" => "Value 3"
              )
  ),
+2  A: 

$meta_boxes['checkbox']['options']['1'] will give you the string "Value 1" from the array, and then you can do whatever you want with that value.

You should now be able to figure out how to access the other two.

Michael Madsen
+2  A: 
$str = '';
foreach($meta_boxes['checkbox']['options'] as $k => $v) {
   $str .= $v . "\n";
}
Jacob Relkin