Im trying to have php code that contains an echo. within that echo however, I need it to echo php code within it. a short example is bellow.
In a html context, <?php
, <something
, etc, is the opening of a html tag. Edit <
with his html entity <
to prevent it happening..
<?php
Even better, use htmlspecialchars:
<?php echo htmlspecialchars('<?php echo "test"; ?>'); ?>
Otherwise, try reversing it:
while ($row = mysql_fetch_array($result))
{
?>
<div style="position: relative;" >
<img src="Backgrounds/<?=$row[id]?>.jpg" alt="error">
<br /><br />
<?php
//Some php content that also uses $row[] content
?>
<br />
</div>
<?php
}
And also switch to PDO objects.