Jump to content

Display ">" "<" Characters


link7722

Recommended Posts

Hello

I want to display the contents of a file in html like this:

<?php
$file = file.txt;
echo '<code><pre>' . $file . '</pre></code>' ;
?>

The problem is that because the file contains sentences which have "<" and ">" characters, for example

"Bla bla <6545465465> bla bla "

the content <6545465465> is not displayed on the page.

Is there a way to display what is inside these speccial characters ?

Thank you

Link to comment
https://forums.phpfreaks.com/topic/269474-display/
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.