开发者

PHP statement between quotes

How can I put a php statement between quotes, inside php?

I want to call str_replace(), and the first argument is a string that is a PHP statement, that I want to replace).

The string is: <?php echo $_GET['number'];?>

Now, how do I put that 开发者_如何学JAVAinto quotes? Is it possible? I just want that to be treated as a string.

Thank you!


Is this all you're trying to do?

echo '<?php echo $_GET["number"];?>';

I think we're a little confused.


If you want to output that exact text to an html page just do

<?php
echo htmlentities('<?php echo $_GET["number"];?>');

I may have misunderstood what you wanted though...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜