Hi,
I am using 'define' to print a message to the screen which includes the % sign:
define('TEXT_ORDER_FORCED_QUANTITY_AMOUNT', 'Your current order qualifies for a 12 percent discount');
I am having to use wording in place of the % sign as if I use the sign the page will not parse correctly. I have tried using a forward and back slash to escape the % sign but this does not work. How is it done?
Thanks,
Rob.
% sign!
Moderator: General Moderators
I'm not sure what you mean by 'parse correctly'. Is the PHP parser throwing errors or does the resulting HTML page not render properly?
If your problem is the former, the PHP errors should guide you. If it's the latter, do what ~TNSG said & replace it with it's character code.
If your problem is the former, the PHP errors should guide you. If it's the latter, do what ~TNSG said & replace it with it's character code.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
Thanks for the replies....
I don't have the error output switched on my server - I just get a blank white page which is what usually happens when there is an error on my page.
I tried substituting '& #37;' for '%' but this just outputs '& #37;' to the screen and not the sign!
How easy is it to swtich the error output on, perhaps this will help narrow the problem down?
An odd one!
Rob.
I don't have the error output switched on my server - I just get a blank white page which is what usually happens when there is an error on my page.
I tried substituting '& #37;' for '%' but this just outputs '& #37;' to the screen and not the sign!
How easy is it to swtich the error output on, perhaps this will help narrow the problem down?
An odd one!
Rob.
I told you to take out the space between the & and the #
Code: Select all
%-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm