FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » A curious thing...about tags.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: A curious thing...about tags. [message #182208 is a reply to message #182205] Sat, 20 July 2013 12:46 Go to previous messageGo to previous message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma:
Senior Member
On 07/20/2013 07:00 AM, The Natural Philosopher wrote:
>
> I have been absolutely unsuccessful in putting PHP tags in a string.
>
> suppose I want my string to be "?> something <?"
>
> ?
>
> How on earth is it possible to STOP PHP interpreting that as some
> blasted 'escape to outputting text'
> ??
>
>

Would this do?

<?PHP
for ($loop = 1; $loop <= 30; $loop++)
{
$ic = chr($loop);
$d1 = chr(63).$ic.chr(62);
$d2 = chr(60).$ic.chr(63);
$str = "$d1 something $d2";

echo "char($loop): $str <br>";
}
?>

Looks like chr(5),chr(7),chr(14) and chr(15) work in cli mode as well.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Paypal IPN and HTTP 1.1
Next Topic: Query with PHP and MySql
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 00:22:43 GMT 2024

Total time taken to generate the page: 0.05535 seconds