title: Codeigniter passing variable to URL
body: <p>I have a list of posts and an <code>edit</code> link for each. When clicking <code>edit</code> it goes to a page where I can edit the specific post I clicked on. For this I will have to pull from the db the id of the post. </p>
  
  <p>Would this be the correct way to do it?</p>
  
  <p><code>&lt;a href="&lt;?php echo site_url("post/edit/$row-&gt;id"); ?&gt;"&gt;Edit&lt;/a&gt;</code></p>
  
  <p><code>post</code> is my controller, <code>edit</code> is my function, and <code>$row-&gt;id</code> should pull the id of the post.</p>