Re: Processing Code created on the fly

From: Date: Sat, 30 Mar 2002 03:16:13 +0000
Subject: Re: Processing Code created on the fly
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-90742@lists.php.net to get a copy of this message
Jason, That is a good point and that being the case, following is my code. Thanks, Jonathan Duncan *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* <? These variables are populated and assigned in a function: (This is just an example. In actuality these variables are populated using other means.) --------------------------------------------------------- $othervars = " $service = $sqlresult['service']; $m_amount = $sqlresult['m_amount']; $paidthru = $sqlresult['paidthru']; $amountdue = $sqlresult['amountdue'];"; $tabledata = " <TD>$account</TD> <TD>$service</TD>"; This is file that calls the above function: (The lines with the *s are supposed to take the data from the variables and then process them as if they were part of the code.) -------------------------------------------- while ($sqlresult = mysql_fetch_array($result)) { $id = $sqlresult['id']; $account = $sqlresult['account']; * $thefunction->othervars; $email = $sqlresult['email']; $terms = $sqlresult['terms']; $account_list .= "<TR CLASS=\"$oddoreven\"> <TD ALIGN=\"center\"><A HREF=\"editaccount.php?id=$id&edit=yes\">image</A></TD> * $thefunction->tabledata; <TD ALIGN=\"center\">\$$m_amount</TD> <TD><A HREF=\"somefile.php\">$paidthru</A></TD> <TD ALIGN=\"center\">\$$amountdue</TD> <TD><A HREF=\"mailto:$email\" $oelinkstyle>$email</A></TD> <TD ALIGN=\"center\">$terms</TD></TR>"; ?>

« previous php.general (#90742) next »