I have $variable
which contains single and dimensional quotes, like this a's"d
I want write this variable as value of checkbox element
<input type="checkbox" name="names[]" value="<?php echo $variable; ?>" />
but when I see result after send html forms, value from checkbox is not correct (reason is quotes), what is right way, for write variables like this, as input value?