![]() |
how can i display PHP code in a text field witout it bein executed?
i want to show a code in a page of my site that can be copy n paste but its runnin the code even when i put in text field
and is there way to make 1 php code within it be executed while the rest is not? i want it to echo a variable within the php code thank u |
n e 1
p l z |
Sorry that's haram.
|
|
ever tried using <? your code ?>
|
Put it inside a textarea, and encode it first.
|
echo "<" . "?php\n";
?> <your code here... don't include the leading and trailing ?php tags> <?php echo "?" . ">\n" Be aware that if your displayed code has any HTML in it the browser will probably eat it up. |
use
highlight_string("<? echo $test; ?>"); |
http://us2.php.net/manual/en/functio...ght-string.php
(assuming you want to do what i think you want to do) |
| All times are GMT -7. The time now is 05:09 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123