Hi, Friday, March 19, 2004, 12:44:40 AM, you wrote: F> I would be very interested in a solution to this problem because I have a similar one.
F> I stored tables on a page. F> examp: F> $table_1 = "<table><tr><td>".$name."</td></tr></table>"; F> $table_2 = "<table><tr><td>".$message."</td></tr></table>"; F> etc... F> and included the page and used the variables (echo $table_1;) F> The table displayed as it should, F> however the variables didn't have values( for $name, $message, etc..) F> I began testing for the problem by defining the string variable F> for the table on the same page as the php code F> examp: F> <?php F> $table_1 = "<table><tr><td>".$name."</td></tr></table>"; F> $table_2 = "<table><tr><td>".$message."</td></tr></table>"; F> $name = "blah blah"; F> if(blah blah){ F> echo $table_1;} F> else{ F> echo $table_2;} ?>> F> Again, the tables printed fine, but the variables ($name, $message) had no values. F> Most recently, I put the whole dam table in each conditional option. F> if (blah blah){ echo F> "<table><tr><td>".$name."</td></tr></table>";} F> else{ echo "<table><tr><td>".$message."</td></tr></table>";} F> Voila, the variables have values. F> It would seem that if a solution was found for Jake's problem F> it would also solve, or provide a key for solving, this one. You have to define variable $name before you try to use it. The only other way would be to eval the string but that is not the way to go :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php