cancel
Showing results for 
Search instead for 
Did you mean: 

Print array with checkboxes, want the values

Print array with checkboxes, want the values

I have an array where i have Checkboxes in.

Each category of checkboxes contains 4 options, and you can choose as many as you want to. I dont know how to get the value without serializing. Can anybody help me?

My array looks like this serialized:

a:4:{i:0;s:1:"5";i:1;s:1:"6";i:2;s:1:"7";i:3;s:1:"8";}

So i only want the values between the " " tags, how can i get this?

3 REPLIES 3

Re: Keeps printing array

In html my checkboxes looks like this:

 

<ul id="options-11-list" class="options-list"><li><input type="checkbox" class="checkbox product-custom-option" name="options[11][]" id="options_11_2" value="5"  /><span class="label"><label for="options_11_2">Send a quotation </label></span><script type="text/javascript">$('options_11_2').advaiceContainer = 'options-11-container';$('options_11_2').callbackFunction = 'validateOptionsCallback';</script></li><li><input type="checkbox" class="checkbox product-custom-option" name="options[11][]" id="options_11_3" value="6"  /><span class="label"><label for="options_11_3">Become a dealer </label></span><script type="text/javascript">$('options_11_3').advaiceContainer = 'options-11-container';$('options_11_3').callbackFunction = 'validateOptionsCallback';</script></li><li><input type="checkbox" class="checkbox product-custom-option" name="options[11][]" id="options_11_4" value="7"  /><span class="label"><label for="options_11_4">Send a catalogue </label></span><script type="text/javascript">$('options_11_4').advaiceContainer = 'options-11-container';$('options_11_4').callbackFunction = 'validateOptionsCallback';</script></li><li><input type="checkbox" class="checkbox product-custom-option validate-one-required-by-name" name="options[11][]" id="options_11_5" value="8"  /><span class="label"><label for="options_11_5">Please contact me </label></span><script type="text/javascript">$('options_11_5').advaiceContainer = 'options-11-container';$('options_11_5').callbackFunction = 'validateOptionsCallback';</script></li></ul>                                    <span id="options-11-container"></span>
                     

Re: Keeps printing array

To simplify it.

 

Re: Keeps printing array

Could you explain what are you trying to do? Not getting what you are asking.