• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set a lebel value

Hi! How can i set the value for a label?
I have done a query over a data base and i want a label to have the value i just search.

how can i do this?

[eluser]Dan Horrigan[/eluser]
You need to provide information if you want a good answer (i.e. are you talking about a form label: "<label></label>"?).

I am going answer it assuming a few things:
1. You are trying to put the value from the database in a form label.
2. You already know how to inject data into a view (if not see the user guide).

It is pretty easy. In the view file just do this:
<label>&lt;?php echo $value_from_db; ?&gt;</label>

Or, if you prefer the form helper:

&lt;?php echo form_label($value_from_db, ''); ?&gt;

Please read the User Guide. It will answer 99% of your questions.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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