I’m trying to pass a php variable name to mysql and then retrieve the variable name back where it displays the appropriate value.
Currently I’m using mysqli, with varchar, but should I be using text? or is this irrelevant.
Data stored in contentData on mysql is as such:
$variableName = VARIABLEVALUE;
So SQL dataRow is:
Some data and information $variableName some data and information
php code i am trying to use to retieve the text and variable is:
$variable = $row_mysqlresult['contentData'];
I’m calling the data as above, but also re-indexing to:
$variable = '. $variable .';
echo = $variable ;
This now displays
Some data and information $variableName some data and information
Instead of
Some data and information VARIABLEVALUE some data and information
I think I’ve just overcomplicated what I’m trying to do…
Any help, much appreciated :))