347
edits
Changes
Created page with "<?php $DNA = " does not contain U."; $RNA = " contains U."; $seq = $_GET['seq']; for($i=0; $i<strlen($seq); $i++) { if($seq[$i] == 'U' || $seq[$i] == 'u') { ech..."
<?php
$DNA = " does not contain U.";
$RNA = " contains U.";
$seq = $_GET['seq'];
for($i=0; $i<strlen($seq); $i++)
{
if($seq[$i] == 'U' || $seq[$i] == 'u')
{
echo "The input sequence is RNA because RNA" . $RNA . "\n";
break;
}
else if($i == strlen($seq)-1)
{
echo "The input sequence is DNA because DNA" . $DNA . "\n";
}
}
?>
$DNA = " does not contain U.";
$RNA = " contains U.";
$seq = $_GET['seq'];
for($i=0; $i<strlen($seq); $i++)
{
if($seq[$i] == 'U' || $seq[$i] == 'u')
{
echo "The input sequence is RNA because RNA" . $RNA . "\n";
break;
}
else if($i == strlen($seq)-1)
{
echo "The input sequence is DNA because DNA" . $DNA . "\n";
}
}
?>