Home Forums General Issues Help With Creating An Array


Help With Creating An Array

  • I want to create an array from the content provided in 3 different checkboxes. I am using WP Frontend in WordPress, to create a form that has different multiselect boxes for different categories.

    For example:

    **Category 1:** Tags: 45,78,97
    **Category 2**: Numbers: 3,7,9
    **Category 3:** Marks: 4,8,12

    When Selected, I would like to create an array that would look like this:

    [tags] => Array
    [0] => Array
    [0] => 45
    [1] => 78
    [2] => 97
    [numbers] => Array
    [0] => 3
    [marks] => Array
    [0] => 18

    Then I would like to serialize it, which would look like this:


    Any advice on the best way of creating this would be massively appreciated.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.