I have a string in my code as per the following example:
<?php
$find = '<tag';
$string = 'blah blah <tag=something>';
?>
Simple enough, but when I try to echo the strings, it's not liking the < or > characters. All that get's echo'ed is:
blah blah
So, basically i'm guessing I need to escape these characters to get them to work in PHP but im not sure exactly how. I'm using this for a templating system, so in the html file a file can be included by using:
<include="filename.html">
So I don't need to show the < and > characters on the screen at any time, I just need to read the file, find the instances of these tags and do some magic. I've got all of that part working but It's just any string that contains more than / less than operators that don't seem to work OK.
Any ideas?