Alright, this one isn’t quite as exciting as the title suggests. I had the need of a quick script for a bit of biology – genetics. Pretty simple stuff really, but I thought I would post it anyway. Generating random sequences of DNA function randdna($len){ $length=intval($len); $bases=array(‘A’,’C’,’G’,’T’); $dna=””; for ($i=0; $i<$length;$i++){ $dna .=$bases[mt_rand(0,3)]; } return… Continue reading Coding with DNA