Welcome Guest, Not a member yet? Register   Sign In
Anchor image using Boostrap
#7

(This post was last modified: 05-11-2019, 05:20 AM by Wouter60.)

The anchor() function takes 3 arguments.
1. URI string
2. Title
3. Options (optional)

The second argument (title) can be a simple text like 'Click here', but it can also be an image or any other html element.
PHP Code:
$image '<img src="' base_url('assets/images/example.png') . '" width="30" height="30" alt="" />';
echo 
anchor('users/login'$image); 

In this example, the result is an image (example.png) that is clickable, like a normal hyperlink. The link points to the login function in the users controller.
Reply


Messages In This Thread
Anchor image using Boostrap - by Mekaboo - 05-09-2019, 06:11 PM
RE: Anchor image using Boostrap - by InsiteFX - 05-10-2019, 03:23 AM
RE: Anchor image using Boostrap - by Mekaboo - 05-10-2019, 06:47 PM
RE: Anchor image using Boostrap - by Mekaboo - 05-10-2019, 07:19 PM
RE: Anchor image using Boostrap - by php_rocs - 05-10-2019, 06:34 AM
RE: Anchor image using Boostrap - by Mekaboo - 05-10-2019, 06:48 PM
RE: Anchor image using Boostrap - by Wouter60 - 05-11-2019, 05:18 AM
RE: Anchor image using Boostrap - by Mekaboo - 05-12-2019, 05:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB