CodeIgniter Forums
Glyphicon anchoring and variable issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Glyphicon anchoring and variable issue (/showthread.php?tid=73888)



Glyphicon anchoring and variable issue - Mekaboo - 06-18-2019

Hello!!

I have 2 things Im trying to figure out:

1. How do one anchor a glyphicon if possible? I would like to use one as a link instead of wording.

2. Got a undefined variable error for this code: if ($video == 0), do I change the number value to correct it?

Thanks so very much!!

Heart Heart ,
Mekaboo


RE: Glyphicon anchoring and variable issue - jreklund - 06-19-2019

1. It's just "text"-element. You can put it inside whatever you want.
Code:
<a href="#">
    <span class="glyphicon glyphicon-asterisk"></span>
</a>

echo anchor('#', '<span class="glyphicon glyphicon-asterisk"></span>');

2. No one can answer that question for you, as you haven't provided any source code. But as the error message says; Your variable $video aren't set. So when it tries to check/validate it with ==. It won't find the source of $video and give that exact error message.


RE: Glyphicon anchoring and variable issue - Mekaboo - 06-19-2019

(06-19-2019, 12:43 AM)jreklund Wrote: 1. It's just "text"-element. You can put it inside whatever you want.
Code:
<a href="#">
   <span class="glyphicon glyphicon-asterisk"></span>
</a>

echo anchor('#', '<span class="glyphicon glyphicon-asterisk"></span>');

2. No one can answer that question for you, as you haven't provided any source code. But as the error message says; Your variable $video aren't set. So when it tries to check/validate it with ==. It won't find the source of $video and give that exact error message.
Thank you for the help! Actually I took out some code so things work better as of now. Heart