<?php
$data = $_POST['web'];
foreach ($data as $value){
    $stringtotest .= $value.',';
}
?>
<form action="checkboxes.php" method="post">
PHP <input type="checkbox" name="web[]"  <?php
           //test to see if php is in my string!
           if (isset($stringtotest)){
            if (eregi('php',$stringtotest)){
               echo ' checked="checked" ';
                }
           }
         
           ?> value="php"/>
HTML <input type="checkbox" name="web[]"  value="html"/>
JavaScript <input type="checkbox" name="web[]" value="javascript"/>
MySQL <input type="checkbox" name="web[]" value="mysql"/>
<input type="submit" name="submit" value="Submit"    />
</form>