Hi Guys, I want to import some code from my SQL db which has php variables in. But when I import and try to use the variables they remain the code and dont take up the values e.g. DB: table [0] = vara table [1] = varb ----- $varb = 4; $out = mysql select table [1] echo $out would output $varb instead of 4 Ive tried something similar with importing from files but no luck so far. Any ideas on how to do this??? Thanks.
Thanks for the suggestion. Ive just tested it but the problem persists: Great news you have a new Lesson Booking!. The Lesson is booked for $$booking[4] on $$booking[2]/$$booking[3]/2009. Please confirm availability to continue processing the lesson. see the $$booking[4] should have changed to a value like 100 but it remains like txt. Any other ideas?
Use eval in this case, ht*p://ww.php.net/eval. Example; <?php $test[0] = "ASDF"; $y = "\$test[0]"; eval("\$y = \"$y\";"); echo $y; ?> PHP: