I have a fairly straightforward piece of code
<div id="questdiv">
<?php
$a = rand() % 100;
$b = rand() % 100;
print "What is ";
print (string)$a;
print " + ";
print (string)$b;
print "?";
?>
</div>
and yet the text that appears in my div is
What is "; print (string)$a; print " + "; print (string)$b; print "?
"; ?>
What have I done wrong? I tried replacing print
with echo
and that did the same thing.