direct html output

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mrtsrky
Forum Newbie
Posts: 2
Joined: Tue Oct 14, 2008 1:23 pm

direct html output

Post 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
Last edited by mrtsrky on Tue Oct 14, 2008 2:04 pm, edited 3 times in total.
User avatar
Ziq
Forum Contributor
Posts: 194
Joined: Mon Aug 25, 2008 12:43 am
Location: Russia, Voronezh

Re: direct html output

Post 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...
User avatar
Ziq
Forum Contributor
Posts: 194
Joined: Mon Aug 25, 2008 12:43 am
Location: Russia, Voronezh

Re: direct html output

Post 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?
Last edited by Ziq on Tue Oct 14, 2008 2:21 pm, edited 1 time in total.
mrtsrky
Forum Newbie
Posts: 2
Joined: Tue Oct 14, 2008 1:23 pm

Re: direct html output

Post by mrtsrky »

very very very thanks
Post Reply