I am creating a cms where an user can upload an url with title. These URLs and titles, I am accessing dynamically in my front page of the website. Suppose if I uploaded an url : www.google.com and title : google; then my front page displays the url : http://localhost/project/index.php/www.google.com and title : google
This is the foreach loop which I am running in my view page to display the url and title.
<?php foreach($links as $a) { ?>
<a href="<?php echo $a -> url; ?>" class="quicklinks"><b><?php echo $a -> url_title; ?></b></a>
<?php } ?>
where echo $a -> url; is pointing to the URL column in the table and echo $a -> url_title; is pointing to the url title column of the table. I am using datampper for the DB Coding. Please help me to display only www.google.com . Thank you so much in advance.