Jump to content

[SOLVED] Formating HTML with htmlspecialchars


___ROCK___

Recommended Posts

Can you guys show me a small example of what you mean on the above answers.  Maybe I'm not doing it right.

 

<?php
$my_str = htmlspecialchars('<html> <head> </head </html>' );
      
        echo $my_str;

?>

 

how can I format that above code to look like this.

 

<html>

 

<title> </title>

 

</html>

 

Link to comment
Share on other sites

seriously? 

 

"simply add \n after each tag"

 

 

<html>\n<head>\n</head>\n</html>\n etc...

I did that but it did not work, and  since you are  a php guru show me something that works.

 

would you like me to hold your dick for you while you pee, too?

 

I don't you to hold my dick, Just open your mouth so I can pee and shit in it!

Link to comment
Share on other sites

Our childish behavior has set me off track for a bit.  Now back to the main topic, I did not mention that I wanted see the formatted text.  :'(

 

Therefore what you have posted is correct, :o  but i need to go one step further which is display the formatted code.   

 

So if i wanted to say "u r rite oh great one".  i would like to have it displayed like this.

 

<html>
<title> The Grate One</title> 
<body> <p> You Are Right, Oh  Great One! </p></body>
</html>

Thanks for all the php help, and for helping me relieve  myself.  :D

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.