How can I with php detect when there is a carriage return at the end of the
text field in a mysql table?
--
Diana Castillo
Destinia.com
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 Ext 216
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
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
Hi,
I am using php to generate and xml output file from another xml file using xsl.
The file is getting created properly and the xml instruction element is at 1st
line.
I am using ant to get the output remotely but it is adding one extra line i.e.
carriage return. I checked everything in my
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
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
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
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: [EMAIL PROTECTED]
To contact the
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:
We've just moved to a new server and I'm running into an odd problem. The
code is below. On my old server it correctly returns:
[test]
t 116
e 101
s 115
t 116
But on my new server I get:
[ test]
13
10
t 116
e 101
s 115
t 116
Has anyone else run into this?
?php
echo "[$action] BR ";
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.
18 matches
Mail list logo