I have a Checkbox field and options in it. When none of the options are selected in the checkbox, it turns this error and the value as well:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in/home3/avisg/public_html/.../wp-content/themes/allcpecialed/single-listing.php on line 346
☐ Difficult to Grasp
But if i select at least one option in the checkbox in the post edit screen, it works perfectly fine. Below the code i am using to get the value from the checkbox, can you please help me to fix this issue?
if( in_array( 'Difficult to Grasp', get_field('cons') ) )
echo "☑ Difficult to Grasp";
echo "☐ Difficult to Grasp";