We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35203
    • 2 Posts
    I am using a ListBox (Multi-Select) TV that has two values in it, both of which I can select. When I try to obtain the TV from a snippet I am doing so like this, where MultiSelect is the name of the TV.

    $multiSelect = $modx->resource->get('MultiSelect');


    This returns an array that looks like this

    Array
    (
        [0] => MultiSelect
        [1] => flickr.css,flickr.js,pagestyle.css,
        [2] => default
        [3] => 
        [4] => listbox-multiple
    )
    


    But when I go to explode(",", $multiSelect[1]), I get this as my result.

    Array
    (
         [0] => flickr.css,flickr.js,page.css,
    }
    


    Why does it not explode correctly?




      • 35203
      • 2 Posts
      Figured it out. Had to set the ListBox Output Type to "Delimiter".