Re: eval()
- From: "Hilarion" <hilarion@xxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Jul 2005 20:15:12 +0200
Mikro wrote:
How is the right way to use this function?
$p2ring3 =mysql_query("SELECT * FROM info where id_link='$id'"); while($rida125 = mysql_fetch_array($p2ring3)) {echo " <table border=1 width=100%> <tr> <td>"; eval(" ".$rida125["info"].""); echo" </td> </tr> </table>
You have syntax error in above code in line:
echo"
What you pass to "eval" function has to be correct PHP code. If you would like to echo some expression contained in $rida125["info"], then you shoud do something like:
eval( 'echo ' . $rida125['info'] . ';' );
or include "echo" and semicolon in the database field value and do only:
eval( $rida125['info'] );
Hilarion .
- References:
- eval()
- From: Mikro
- eval()
- Prev by Date: Re: problems with frames
- Next by Date: form problem (?)
- Previous by thread: Re: eval()
- Next by thread: form problem (?)
- Index(es):