• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
php CI variable out the database

I have a problem .

I have saved in a database table standard_content the follow text : $this->config->item('plaats')

now want i this on my site whit this:

$content = $st_content->result_array();
echo $content[0]['content'];

but then i see this "$this->config->item('plaats')" but i want to see "Amsterdam"

can someone help me.

Sorry for my bad englisch


So you want to save php code in the database, then execute it?

The only solution I can think of is eval(), which you shouldn't use.

I hav a text in a table:
hello nice to see you on this local website of ( cityname).

and then is cityname the variable that i allready know because it is my subdomain.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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