title: about php dynamic link <a href=""></a>
body: <p>Hello stackoverflow users,</p>
  
  <p>My problem is about php dynamic  link creation. </p>
  
  <p>I try to create dynamic  link like;</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="tr" xml:lang="tr"&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9" /&gt;
          &lt;title&gt;Dilşad Çiçekçilik&lt;/title&gt;    
  
          &lt;script type="text/javascript" src="yoxview/yoxview-init.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="yoxview"&gt;
            &lt;?php 
  
            ...
  
            for($i=0;$i&lt;$images-&gt;num_rows();$i++) {
                echo "&lt;a href='".$imagesArr[$i]."' &gt;&lt;img src='".$thumbsArr[$i]."' /&gt;&lt;/a&gt;";
            } 
  
            ....
  
            ?&gt;
            &lt;?php echo $this-&gt;pagination-&gt;create_links(); ?&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my problem start from the line;</p>
  
  <pre><code>echo "&lt;a href='".$imagesArr[$i]."' &gt;&lt;img src='".$thumbsArr[$i]."' /&gt;&lt;/a&gt;";
  
  
  $imagesArr[$i] contains the url --&gt;"yoxview/gallery/sevgiliye/images/anneye10.jpg"
  
  $thumbsArr[$i] contains the url --&gt;"yoxview/gallery/sevgiliye/thumbs/anneye10.jpg"
  </code></pre>
  
  <p>But, generated html page created to link like this:</p>
  
  <p>.http://localhost/codeigniter/galleryController/index/yoxview/gallery/sevgiliye/images/anneye10.jpg</p>
  
  <p>.http://localhost/codeigniter/galleryController/index/yoxview/gallery/sevgiliye/thumbs/anneye10.jpg</p>
  
  <p>my controller name "galleryController" and my function name "index" and other base url are adding before the  href link.</p>
  
  <p>I want to created link which contains only</p>
  
  <p>yoxview/gallery/sevgiliye/images/anneye10.jpg</p>
  
  <p>this url.</p>
  
  <p>How can i achive this ? </p>
  
  <p>Thank you. </p>