\n issue in php
Posted 01 September 2006 - 06:41 AM
For example (coming from PHP):
the ideal display or output is:
but instead of displaying it, it ignores the \n character making the text overlap each other.
hope someone could help me out with this, thanks in advance
Posted 01 September 2006 - 06:54 AM
Posted 01 September 2006 - 07:14 AM
can this issue be resolved in php.ini file?
Posted 01 September 2006 - 07:58 AM
Posted 01 September 2006 - 08:04 AM
<?php echo nl2br("hello welcome bye");?>
the out but into html should be somthing like this
hello<br> welcome<br> bye
Posted 01 September 2006 - 08:41 AM
when i checked my php.ini file, the setup is already
magic_quotes_gpc() = On
magic_quotes_runtime() = Off
magic_quotes_sybase() = Off
i cannot figure out what is wrong anymore?
Posted 01 September 2006 - 09:22 AM
Posted 01 September 2006 - 09:46 AM
let's say i would retrieve an id and name from the database and combine them into one string
$string=id ."\n". name;
after which i would use the string variable to write on the pdf using
but after this process and when the pdf is streamed into php, the id and name overlap each other instead of the name placed on the next line on the pdf file created.
i am running out of ideas because this same code when run in another server (with the same configuration and setup) actually works, meaning the id and name are separated and the newline character was applied.
Posted 04 September 2006 - 12:55 AM
just to reiterate, the confusing part here is that why in some machines it work but in others it doesn't
thanks for all the replies
Posted 04 September 2006 - 01:13 AM
Posted 04 September 2006 - 01:33 AM
but when \r alone is used it just writes/displays the text in one line.
my guess is that the problem is already with the configuration or settings because the same scripts are used in different machines though not all display the desired appearance of the text on the PDF. of course, i'm still new with the ezpdf functionality.
any other ideas will be greatly appreciated
Posted 04 September 2006 - 01:38 AM
Posted 04 September 2006 - 01:40 AM
Posted 06 September 2006 - 01:11 AM
i already tried using nl2br() and addslashes() but neither works. the first one makes the system also display the br tag while the latter has no effect to the string displayed meaning it has the same effect of text being overlapped to each other.
any other ideas as to why this is so? cannot figure out what to do anymore
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users