How do I escape a new line character in a .ini file so that Zend_Config_Ini reads it literally?
- by Nick
I am trying to store a multiple line e-mail in an ini file using PHP/Zend Framework. My string has new lines characters in it, and when I use Zend_Config_Ini to parse the ini file, the new line characters come back escaped, so they are printed out on screen, instead of a line feed.
Example:
// ini file
message = Hi {0},\n\nThis is a test message.\nGoodbye!
is parsed by Zend_Config_Ini as:
Hi {0},\\n\\nThis is a test message.\\nGoodbye!
which then is printed out in the email as:
Hi John,\n\nThis is a test message.\nGoodbye!
Instead I want the e-mail to look like this:
Hi John,
This is a test message.
Goodbye!
Does anybody know how to achieve this? Thanks!