title: How to put variable in codeigniter $row->data
body: <p>I want to make the variable more simple by just change its title.. here's my code</p>
  
  <pre><code>&lt;?php foreach($query-&gt;result() as $row) : ?&gt;
              &lt;?php $id = $this-&gt;uri-&gt;segment(1);?&gt;
              &lt;?php if($id === "product"){ $id === 'product'; }elseif($id === 'pabrikan'){ $id === 'pabrikan';}   ?&gt;
              &lt;?php $productTitle = str_replace(' ' ,'-', $row-&gt;.$id._title);?&gt;&lt;?php endforeach;?&gt;
  </code></pre>
  
  <p>However I want to make the $productTitle can be dynamic by just take from $id.
  How can $row->product_title can be $row->$id_title the $id is taken from segment 1.</p>