How to input php echo outside of the php tag
<p>I have this php code that input selected="" at a specific url. I need selected="" to in inserted into my html.</p>

<pre><code>   &lt;?php
    $uri = $_SERVER['REQUEST_URI'];
    if ( strpos($uri,'retailers/amazon/?sort=2') !== false ) {
       echo 'selected=""';
    } else {
       echo 'test';
    }
    ?&gt;
</code></pre>

<p>This is the html, I need to insert selected=""... Something like this </p>

<pre><code>&lt;option selected="" value="retailers/amazon/?sort=2"&gt;Newest to Oldest&lt;/option&gt;
</code></pre>

<p>...</p>

<pre><code>&lt;select onchange="window.location=this.value;"&gt;
  &lt;option value=""&gt;Select&lt;/option&gt;
  &lt;option selected="" value="retailers/amazon/?sort=2"&gt;Newest to Oldest&lt;/option&gt;
  &lt;option value="retailers/amazon/?r_sortby=highest_rated&amp;r_orderby=desc"&gt;Success Rate: High to Low&lt;/option&gt;
  &lt;option value="retailers/amazon/?r_sortby=highest_rated&amp;r_orderby=asc"&gt;Success Rate: Low to High&lt;/option&gt;
  &lt;option value="retailers/amazon/?sort=0"&gt;Most Comments&lt;/option&gt;
&lt;/select&gt;
</code></pre>
