I am still learning PHP, and while reading understanding one of the tutorials that was linked in this forum, I was caught with this code:
Code: Select all
<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
{
?>
<h3>strpos() must have returned non-false</h3>
<p>You are using Internet Explorer</p>
<?php
}
else
{
?>
<h3>strpos() must have returned false</h3>
<p>You are not using Internet Explorer</p>
<?php
}
?>Code: Select all
<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
{ -[b][i] why is this in between <?php ?> tags[/i][/b]
?>
<h3>strpos() must have returned non-false</h3>
<p>You are using Internet Explorer</p>
<?php
}
else
{
?>
<h3>strpos() must have returned false</h3>
<p>You are not using Internet Explorer</p>
<?php
} - [b][i]why is this in between <?php ?> tags[/i][/b]
?>