php - How generate hyperlinks for news show in codeigniter -


i created news panel use code displaying news :

 <marquee direction="up" >  <?php  $query = $this->db->get('news');  foreach ($query->result() $row) {     echo $row->news;     echo $row->urladdress;      echo '<br/>'; } ?>  </marquee> 

where show correct , data fetched , run marquee ,

but tried ,when click on news go urladdress , fetch table . using code not work -

<marquee direction="up" >                <?php                 $query = $this->db->get('student');  foreach ($query->result() $row) {     echo $row->news;     echo $row->urladdress;     echo '<a href="$row->urladdress">click here</a>';     echo '<br/>'; }  </marquee> 

<marquee direction="up" > <?php     $query = $this->db->get('student');      foreach ($query->result() $row)     {         echo $row->news;         echo $row->urladdress;         echo '<a href="'.$row['urladdress'].'">click here</a>';         echo '<br/>';     }     ?> 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -