Welcome Guest, Not a member yet? Register   Sign In
Help with configs and controllers
#1

[eluser]Unknown[/eluser]
I have a controller that generates an image. I want the image to include a config variable that I have set called main_site1.
The line of code is
Code:
$data['add_text'] = "*custom_text*{$data['name']} is $qty1 $unit1 $qty2 $unit2 old.";

How can I add the text in my $config['site_name1'] variable to the end?
#2

[eluser]ejangi[/eluser]
I think what you're wanting is this:

Code:
$data['add_text'] = "*custom_text*{$data['name']} is $qty1 $unit1 $qty2 $unit2 old.".$this->config->item('site_name1');

Check out the user guide for more on using config items.
#3

[eluser]Unknown[/eluser]
Thanks! That is exactly what I needed!




Theme © iAndrew 2016 - Forum software by © MyBB