• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
anchor tag inside form_label

this is what I want to do:
<label><a href="">Text1</a>Text2</label>

my setup:

$anchor = anchor(
'more text',

&lt;?php echo form_label('some text', $another_variable, $anchor); ?&gt;

this is what I get:

<label>some text</label>

any advice?

Yes, you are supplying the wrong parameters to form_label(). Where you are putting $anchor as the 3rd parameter is not correct as that is for extra parameters, like setting a classname or id. The first parameter is where anchor should be going (along with any other text) as that is the text that gets displayed in the <label>. The 2nd parameter is for the "name" of the label. See the userguide for more details on how to use it.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.