I am not sure if this should og here or in the database forum, however, i do believe it's a php function i'm searching for.

Seems a bit nooby to me that i cannot find the answer, however, i have searched throughly through alot of stuff with no luck 🙂.

Lets say a database table has this field: "Your information is: $info."

now you go to pull it out:

$info = "Whatever information that needs to be set - langauge for example.";
$query = mysql_query(...)
$get_query = mysql_fetch_array(..)

$get_info = $get_query('1');
echo $get_info;
//now within $get_info, it does not parse $info from teh database.
// basically i'm setting a var in my script, that i then need to be parsed from the DB
//i can do this:
$new_info = str_replace("$info", $info, $get_info);

however, in my case i'd have to use the above line many times before it's any good. There must be a function where you parse the variable, even if it's pulled from a Database
Anybody got any tips? 🙂

    [man]eval[/man] would probably do the job for you. I haven't used it myself, but according to the manual it does exactly what you seem to want.

      Don't forget about security considerations when using eval(). If an attacker discovers you're executing raw PHP code stored in a database field (which I assume info is getting in the db via some sort of form), you could be in for trouble.

        And also don't forget the general rule about using eval(): don't.

          Write a Reply...