<p>
<label><b>Gadżety:</b></label>
<br>
<?php 
  $options = array('Aparat cyfrowy','Odtwarzacz MP3','Tablet');
  foreach ($options as $option) { 
    echo '<label><input type="checkbox" name="toys[]" '; 
    echo 'value="' . $option . '"';
    if ( is_array($toys) && in_array($option, $toys ) ) {
      echo " checked";
    }
    echo ">" . $option . "</label><br>" ; 
  } 
?> 
<span class="error"><?php echo $toysErr; ?></span>
</p>
