How do I escape quotes in URL?
<p>I want to insert a URL all into single quotes. I have tried using both single and double quotes, but it is not working. I checked this question - <em><a href="https://stackoverflow.com/questions/36600389/escaping-single-quote-in-url-link">Escaping single quote in URL link</a></em>, but it did not help:</p>

<pre><code>&lt;?php
    echo '\'' base_url().'\'index.php?admin/product/delete/1\'';
    echo '\''; echo base_url().index.php?admin/product/delete/1\'';
    echo '\'. base_url().index.php?admin/product/delete/1\'';
    echo "\'"; echo base_url().'index.php?admin/product/delete/1\'";
?&gt;
</code></pre>

<p>I am trying to achieve this:
'<a href="http://localhost/my_site/index.php?admin/product/delete/1" rel="nofollow noreferrer">http://localhost/my_site/index.php?admin/product/delete/1</a>'</p>

<p>The URL in single quotes.</p>