Welcome Guest, Not a member yet? Register   Sign In
How to call a image name from my database
#5

[eluser]jedd[/eluser]
Hi Miguel and welcome to the CI forums.

I think the img() tags stuff is sorted, so I'll just chime in with the suggestion that you may find it clearer to not drop in and out of PHP/HTML so rapidly. You can code the above segment like this instead, for example:


Code:
<?php
    foreach($query->result() as $row)  {
         echo "<strong>". anchor('articles/view/'.$row->url, $row->title) . "</strong>";
         echo "<span>". $row->date. "</span>";
         echo img($row['graphics']);  // You can put your extra tags into an array for img()
         }
?&gt;

Read more about the img() tag in the [url="/user_guide/helpers/html_helper.html"]HTML Helper[/url] section of the manual.


Messages In This Thread
How to call a image name from my database - by El Forum - 11-18-2009, 09:42 PM
How to call a image name from my database - by El Forum - 11-18-2009, 11:12 PM
How to call a image name from my database - by El Forum - 11-19-2009, 03:49 PM
How to call a image name from my database - by El Forum - 11-20-2009, 09:27 AM
How to call a image name from my database - by El Forum - 11-20-2009, 09:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB