I have a language file in a script that's fully of a bunch of "define" veriables just like this: define('TITLE', 'Blah, blah blah'); Then, on the page, it's called like this: <?php echo TITLE?> I was wondering how I can add just some basic formatting options to this, such as being able to display an apostrophe ' properly as well as being able to specify where a new line begins. There are a few variables in the language file that are quite lengthy and I don't like not being able to start a new line where I want and such. I was reading a little bit about htmlspecialchars... is this what I should use? And if so, how? Thanks!
You can always include the ' inside your text when defining a constant, you just have to excape it with a \. Eg. <?php DEFINE'_TITLE','This wouldn\'t give off an error.'); ?> <?php echo _TITLE; ?> Would print This wouldn't give off an error. You can always use ' inside of tags that are enclosed with ' ' as long as you use the \ before. Hope that helps.
Yeah, I appreciate that information. How about for a line break, such as <br>? How do I insert line breaks within this type of file? Thanks a lot for your help.
You can enter the HTML inside of what you are defining regularly. In my language file, I have included <strong> and <a href tags and it hasn't given me any trouble. You should be able to just enter <br /> and be fine... <?php DEFINE('_TITLE','THis is a <br /> break.'); ?>