Yeah, I have played with the eval function a bit, but it didn't seem to help
much.  Then again, I haven't ever used the eval function before so I may not
know how to properly implement it.  I have read the page for eval on php.net
several times as well as the very helpful examples, but whenever I use eval,
it just prints out the same stuff.  By same stuff I mean wether I use eval
or just the variable by itself it just prints out the contents of the
variable.  In the web page source it looks as if the contents were merely
echoed because it still has the $'s and variable names.  Any other ideas or
examples on how to implement eval on this?

Thanks for the help,
Jonathan Duncan


"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Saturday 30 March 2002 11:16, Jonathan Duncan wrote:
>
> > <?
> > 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>";
> > ?>
>
> You need to check out the eval() function.
>
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> The real trouble with reality is that there's no background music.
> */



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to