Re: HTML code in eval



"Johannes Matjeschk" <Johannes.Matjeschk@xxxxxxxxxxxxxx> wrote in message
news:1141980306.543975.27770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
eval(); is evil. You should use it only in extreme situations.

You can also try here document syntax.

http://de.php.net/echo

They should just rename it to evil() and get it over with. "If eval() is
ever the answer, you've screwed up the question" :-P

sunnyboy@xxxxxxxxxx wrote:
Hi

I'm currently trying to put some HTML code into a variable and to use
it later.
Any ideas, why TEST1 in the following example displays a link, while
TEST2 only displays a text?

Any help appreciated.

<html>
<head>
</head>

<body>

<!-- TEST1 -->
<a href=\"www.test.com\">this is test1</a>

<br><br>

<!-- TEST2 -->
<?
$teststr="?><a href=\"www.test.com\">this is test2</a><?php";
eval($teststr);
?>

</body>
</html>



.



Relevant Pages

  • Re: HTML code in eval
    ... eval; is evil. ... You should use it only in extreme situations. ... You can also try here document syntax. ... I'm currently trying to put some HTML code into a variable and to use ...
    (comp.lang.php)
  • Re: retrieve data from html page to input as a string or text file
    ... Private Sub Reading_Click ... Dim variable1 As String ... Just write anything you want in a text fileand then rename it ... if you want something not so sibmple,with html code etc..i do not ...
    (microsoft.public.vb.general.discussion)