Diana Castillo wrote:
How can I with php detect when there is a carriage return at the end of the
text field in a mysql table?
get the data out of the DB first. stick it in $myString
$myString = wtf I fond a carriage return - horsedrawn even.\n;
if (preg_match(#[\n|\r|\r\n]$#, $myString))
Diana Castillo wrote:
How can I with php detect when there is a carriage return at the end of the
text field in a mysql table?
Something like this perhaps:
$res = mysql_query($query);
$row = mysql_fetch_object($row)
if (preg_match(/\r$/,$row-textfield) {
echo Got CR;
} else {
echo
Make sure there are no extra characters (including linefeeds) after the
closing ? in your php source file.
Brandon Ryan
On 12 Apr 2005 19:42:17 -, Dipesh Khakhkhar
[EMAIL PROTECTED] wrote:
Hi,
I am using php to generate and xml output file from another xml file using
xsl.
The
Pag --
...and then Pag said...
%
% At 16:46 24-08-2002 +0200, Bas Jobsen wrote:
% use nl2br($content);
%
% I assume i should use that function when sending to the page,
Right; it will convert newlines to linebreaks.
% after retrieving the text from the DB, right? Cant i do
On Wed, 5 Sep 2001 17:22, Johan Vikerskog (EMP) wrote:
My php script is generating a file that is saved in Unix format.
I automatically get the ^M in the end of everyline. Is there a way
of saving this without getting the ^M in the end of each line?
Thanks in advance
//Johan
If you are
]]
Sent: den 5 september 2001 10:29
To: Johan Vikerskog (EMP); php_list
Subject: Re: [PHP] Carriage return.
On Wed, 5 Sep 2001 17:22, Johan Vikerskog (EMP) wrote:
My php script is generating a file that is saved in Unix format.
I automatically get the ^M in the end of everyline. Is there a way
a result of their simulation. They have a option to
save the result to a file and when they do that they get the ^M.
//Johan
-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: den 5 september 2001 10:29
To: Johan Vikerskog (EMP); php_list
Subject: Re: [PHP] Carriag
My php script is generating a file that is saved in Unix format.
I automatically get the ^M in the end of everyline. Is there a way
of saving this without getting the ^M in the end of each line?
/usr/bin/perl -npe 's/\r\n/\n/g' filename
will remove the Ctrl-M characters for you. You could
if there is a built in function of some kind that will do this.
//Johan
-Original Message-
From: Jon Farmer [mailto:[EMAIL PROTECTED]]
Sent: den 5 september 2001 11:44
To: Johan Vikerskog (EMP); php_list
Subject: Re: [PHP] Carriage return.
My php script is generating a file that is saved in Unix
So sprach »Johan Vikerskog (EMP)« am 2001-09-05 um 11:48:11 +0200 :
What i need to know is if there is a way to do this without involving
unix commands like perl sed dos2unix etc etc. I need to know if
there is a simple way to do this with just php and not some regexp
solution. I want to
On Wed, 5 Sep 2001, Johan Vikerskog (EMP) wrote:
My php script is generating a file that is saved in Unix format.
I automatically get the ^M in the end of everyline. Is there a way
of saving this without getting the ^M in the end of each line?
The ^M you see is a DOS carriage return/line
Magnus Lawrie wrote:
hello,
I'm writing to files with php. How do I include a carriage return, i.e.
write strings to different lines in a text file?
Thanks,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
form method=post action='$PHP_SELF'
input type=submit
/form
even the simplest forms product a 0x013 0x10 imediatly after the form I wish there
was a way to control this behaviour. I thought it was normal, and anoying.
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph.
13 matches
Mail list logo