Igeek global
Igeek global

Reputation: 21

Can't add image in a PHP code in a link

$aux_links_output .= '<li><a href="'.$login_url.'">'. __("Register", "swiftframework") .'</a>'. "\n";
                    $aux_links_output .= '<li><a href="'.$login_url.'">'. __("Login", "swiftframework") .'</a>'. "\n";

This code display Register and Login but i want an icon i have made in png to be displayed instead.So anybody can please help I shall be thankful.

Upvotes: 2

Views: 25

Answers (1)

Igor Unger
Igor Unger

Reputation: 182

You have to add an img tag in your anchor:

$aux_links_output .= '<li><a href="'.$login_url.'">'. __("Register", "swiftframework") .'<img src="link to your icon" title="" alt=""/></a>'. "\n";
$aux_links_output .= '<li><a href="'.$login_url.'">'. __("Login", "swiftframework") .'<img src="link to your icon" title="" alt=""/></a>'. "\n";

Upvotes: 1

Related Questions