0

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"
              )
  ),
0

2 Answers 2

3
$str = '';
foreach($meta_boxes['checkbox']['options'] as $k => $v) {
   $str .= $v . "\n";
}
Sign up to request clarification or add additional context in comments.

Comments

2

$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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.