Page 1 of 1

direct html output

Posted: Tue Oct 14, 2008 1:28 pm
by mrtsrky
hi
i from turkey
i can't speak english enough
my php code is:

<?php
echo "<h1>murat sarıkaya</h1"
?>


i want to see php output: <h1>murat sarıkaya</h1>


not
murat sarıkaya

please help me

Re: direct html output

Posted: Tue Oct 14, 2008 1:40 pm
by Ziq
I cannot understand that do you want? If you execute this code

Code: Select all

 
<?
echo '<h1>murat sar?kaya</h1>';
?>
 
You get '<h1>murat sar?kaya</h1>' in output.

P.S. Maybe I have some problems this translation...

Re: direct html output

Posted: Tue Oct 14, 2008 2:12 pm
by Ziq
Do you sure that this code return "murat sar?kaya", not "<h1>murat sar?kaya</h1>"? Look at your HTML-code. Or try this code:

Code: Select all

 
<?
echo htmlspecialchars("<h1>murat sar?kaya</h1>");
?>
 
What do you see in output?

Re: direct html output

Posted: Tue Oct 14, 2008 2:16 pm
by mrtsrky
very very very thanks