Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

output string literals

Codes here !

Moderators: macek, egami, gesf

output string literals

Postby meggie » Wed Nov 07, 2012 3:41 am

This is a fragment from the database that I want to output:

#include <iostream>

but the <iostream> does not output anymore. i assume that it is read as a tag. how can i output that one?

thanks in advance!
meggie
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Nov 07, 2012 3:34 am

Re: output string literals

Postby MeroD » Wed Nov 07, 2012 4:57 am

Try:
$output = htmlspecialchars($input, ENT_QUOTES);

http://www.php.net/manual/en/function.h ... lchars.php
MeroD
New php-forum User
New php-forum User
 
Posts: 53
Joined: Wed Oct 10, 2012 12:14 am

Re: output string literals

Postby meggie » Wed Nov 07, 2012 10:27 am

Thanks MeroD! It worked! :)
meggie
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Nov 07, 2012 3:34 am


Return to mySQL & php coding

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.