On Dec 14, 2012 9:49 AM, "Andy McKenzie" wrote:
>
> Hey folks, kind of a strange question here.
>
> Basically, I've been trying to move my style from "self taught" to "Oh
> yeah, there IS a standard for this." One of the things I frequently
> want to do is define sections of my code: to take a s
On Fri, Dec 14, 2012 at 11:20 AM, Paul M Foster wrote:
> On Fri, Dec 14, 2012 at 10:48:05AM -0500, Andy McKenzie wrote:
>
>> Hey folks, kind of a strange question here.
>>
>> Basically, I've been trying to move my style from "self taught" to "Oh
>> yeah, there IS a standard for this." One of the
On Fri, Dec 14, 2012 at 10:48:05AM -0500, Andy McKenzie wrote:
> Hey folks, kind of a strange question here.
>
> Basically, I've been trying to move my style from "self taught" to "Oh
> yeah, there IS a standard for this." One of the things I frequently
> want to do is define sections of my code
On 1/25/2011 9:05 PM, Ethan Rosenberg wrote:
Dear list -
I have a program with the following statement: $out = system('ls -l',
$retval); The output is a string. How do I format the output to be in
the Linux format, that is in columns. I cannot think of a way to use
explode to do it.
Advice and
Hi You can try something like this:
> Ethan Rosenberg wrote:
>
>> Dear list -
>>
>> I have a program with the following statement: $out = system('ls -l',
>> $retval); The output is a string. How do I format the output to be in
>> the Linux format, that is in columns. I cannot think of a way to u
Ethan Rosenberg wrote:
Dear list -
I have a program with the following statement: $out = system('ls -l',
$retval); The output is a string. How do I format the output to be in
the Linux format, that is in columns. I cannot think of a way to use
explode to do it.
Advice and comments, please.
Tha
Dear list -
I have a program with the following statement: $out = system('ls
-l', $retval); The output is a string. How do I format the output
to be in the Linux format, that is in columns. I cannot think of a
way to use explode to do it.
Advice and comments, please.
Thanks
Ethan
MySQ
From: Cris S
> Someone needs to hire me now, to keep me busy and stop me
> from taking this issue apart one piece at a time. Kee-rist.
That's not likely to happen soon. You have demonstrated here that you
are immature and have very little self-control or self-respect. There is
no way you would be
At 12:39 AM -0400 10/19/10, Paul M Foster wrote:
On Mon, Oct 18, 2010 at 10:46:41PM -0400, Cris S wrote:
-snip- (of no importance)
Please go back to lurking. We'd all appreciate it, and you'll be
happier.
Paul
--
Paul M. Foster
I agree with Paul on this one.
Chris S has no idea of what we
http://www.ashleysheridan.co.uk
- Reply message -
From: "Cris S"
Date: Tue, Oct 19, 2010 03:46
Subject: [PHP] Formatting an ECHO statement.
To:
At 15:12 18 10 10, Shreyas Agasthya wrote:
>Thanks all for their input. Some of the learnings from the thread :
>
>1. tag is getting deprec
Thanks for that detailed mail, Admin. The was an example and I wanted to
understand how does one go about the whole formatting. Nonetheless, I am
pretty well informed after this thread.
Thanks once again, everyone.
Regards,
Shreyas
On Tue, Oct 19, 2010 at 10:09 AM, Paul M Foster wrote:
> On Mo
On Mon, Oct 18, 2010 at 10:46:41PM -0400, Cris S wrote:
> At 15:12 18 10 10, Shreyas Agasthya wrote:
> >Thanks all for their input. Some of the learnings from the thread :
> >
> >1. tag is getting deprecated.
>
> Not in HTML5.
>
> >2. Use and
>
> Both? Read that shit again, buckwheat. And b
At 15:12 18 10 10, Shreyas Agasthya wrote:
Thanks all for their input. Some of the learnings from the thread :
1. tag is getting deprecated.
Not in HTML5.
2. Use and
Both? Read that shit again, buckwheat. And by "that shit" I
do mean the standards, not what Joe Bloe told you.
3. Have
(including search engines, screen readers, etc) to infer a meaning
for than important message Thanks,
Ash http://www.ashleysheridan.co.uk - Reply message - From:
"tedd" Date: Mon, Oct 18, 2010 17:51
Subject: [PHP] Formatting an ECHO statement. To:
At 9:47 AM -0400 10/18/10, Steve
c, and I would not use static filters personally. It is meant as an
explanation, not a how to.
-Original Message-
From: Shreyas Agasthya [mailto:shreya...@gmail.com]
Sent: Monday, October 18, 2010 6:10 AM
To: PHP General List
Subject: [PHP] Formatting an ECHO statement.
Team,
A
Thanks all for their input. Some of the learnings from the thread :
1. tag is getting deprecated.
2. Use and
3. Have CSS used to do the kind of stuff I was trying. I must inform, this
was already in place.
4. Keep an eye on the SE monster.
Regards,
Shreyas
On Mon, Oct 18, 2010 at 11:43 PM, A
On Mon, Oct 18, 2010 at 1:28 PM, tedd wrote:
> At 6:03 PM +0100 10/18/10, a...@ashleysheridan.co.uk wrote:
>>
>> There's nothing wrong with using as it indicates emphasised text,
>> which is semantic. Use span tags with classes only when the content you're
>> styling has no semantic alternative.
At 6:03 PM +0100 10/18/10, a...@ashleysheridan.co.uk wrote:
There's nothing wrong with using as it indicates emphasised
text, which is semantic. Use span tags with classes only when the
content you're styling has no semantic alternative.
important message is much better for machines
(includi
At 9:47 AM -0400 10/18/10, Steve Staples wrote:
or create a style sheet, with a class definition for italic.
Steve.
+1
The "best practices" way to do it.
Don't style output in an echo statement, but rather put styling in a
css sheet, It's much cleaner there.
Cheers,
tedd
--
---
htt
On Mon, 2010-10-18 at 09:25 -0400, Paul M Foster wrote:
> On Mon, Oct 18, 2010 at 03:40:03PM +0530, Shreyas Agasthya wrote:
>
> > Team,
> >
> > A bit of silly one but like my book says, there are no dumb questions, I am
> > asking it here.
> >
> > If I have :
> >
> > $other="Whatever";
> >
> >
On Mon, Oct 18, 2010 at 03:40:03PM +0530, Shreyas Agasthya wrote:
> Team,
>
> A bit of silly one but like my book says, there are no dumb questions, I am
> asking it here.
>
> If I have :
>
> $other="Whatever";
>
> and I do:
>
> echo 'Other Comments:' .$other. '
>
> works perfectly well and
> -Original Message-
> From: Shreyas Agasthya [mailto:shreya...@gmail.com]
> Sent: Monday, October 18, 2010 3:10 AM
> To: PHP General List
> Subject: [PHP] Formatting an ECHO statement.
>
> Team,
>
> A bit of silly one but like my book says, there are no dumb
> -Original Message-
> From: Shreyas Agasthya [mailto:shreya...@gmail.com]
> Sent: 18 October 2010 11:10
>
> A bit of silly one but like my book says, there are no dumb
> questions, I am
> asking it here.
>
> If I have :
>
> $other="Whatever";
>
> and I do:
>
> echo 'Other Comments:' .
Team,
A bit of silly one but like my book says, there are no dumb questions, I am
asking it here.
If I have :
$other="Whatever";
and I do:
echo 'Other Comments:' .$other. '
works perfectly well and prints the value. What if I want to, now, italicize
the value of $other with the above syntax?
Thank you Nathan,
This worked quite well.
--Rick
On Jan 22, 2010, at 8:10 PM, Nathan Rixham wrote:
Rick Dwyer wrote:
On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote:
Thanks Nathan I'll give it a shot.
np - here's a more condensed version:
function round_to_half_cent( $value )
{
$
Rick Dwyer wrote:
> On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote:
> Thanks Nathan I'll give it a shot.
>
np - here's a more condensed version:
function round_to_half_cent( $value )
{
$value = ($value*100) + 0.3;
$out = number_format( floor($value)/100 , 2 );
return $o
On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote:
Thanks Nathan I'll give it a shot.
--Rick
your doing the number format before the rounding.. here's a version of
the function that should fit the bill:
function round_to_half_cent( $value )
{
$value *= 100;
if( $value ==
Rick Dwyer wrote:
>
> On Jan 22, 2010, at 4:24 PM, tedd wrote:
>
>>> Hello List.
>>>
>>> In an earlier post, I received help with a custom function to round
>>> decimals off (the custom function provided by Adam Richardson is below).
>>>
>>> However in my MySQL db, when I have values with only 1
Paul M Foster wrote:
> On Mon, Jan 11, 2010 at 04:56:03PM -0500, tedd wrote:
>
>> --Rick:
>>
>> The above described rounding algorithm introduces more bias than
>> simply using PHP's round() function, which always rounds down. IMO,
>> modifying rounding is not worth the effort.
>>
>> The "best" ro
On Jan 22, 2010, at 4:24 PM, tedd wrote:
Hello List.
In an earlier post, I received help with a custom function to round
decimals off (the custom function provided by Adam Richardson is
below).
However in my MySQL db, when I have values with only 1 decimal
point, I need the value PHP r
Hello List.
In an earlier post, I received help with a custom function to round
decimals off (the custom function provided by Adam Richardson is
below).
However in my MySQL db, when I have values with only 1 decimal
point, I need the value PHP returns to display as 2. For example,
3.8 need
Hello List.
In an earlier post, I received help with a custom function to round
decimals off (the custom function provided by Adam Richardson is below).
However in my MySQL db, when I have values with only 1 decimal point,
I need the value PHP returns to display as 2. For example, 3.8 need
On Mon, Jan 11, 2010 at 04:56:03PM -0500, tedd wrote:
>
> --Rick:
>
> The above described rounding algorithm introduces more bias than
> simply using PHP's round() function, which always rounds down. IMO,
> modifying rounding is not worth the effort.
>
> The "best" rounding algorithm is to look at
On Mon, Jan 11, 2010 at 7:45 PM, Mattias Thorslund wrote:
> tedd wrote:
>
>> At 2:55 PM -0500 1/11/10, Rick Dwyer wrote:
>>
>>> I have been asked to further modify the value to the nearest half cent.
>>>
>>> So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
>>> If it ends in 3,
tedd wrote:
At 2:55 PM -0500 1/11/10, Rick Dwyer wrote:
I have been asked to further modify the value to the nearest half cent.
So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
If it ends in 3, 4, 5, 6 it gets rounded to 5. And if it 7, 8 or 9
it gets rounded up to full ce
On Jan 11, 2010, at 4:56 PM, tedd wrote:
At 2:55 PM -0500 1/11/10, Rick Dwyer wrote:
I have been asked to further modify the value to the nearest half
cent.
So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
If it ends in 3, 4, 5, 6 it gets rounded to 5. And if it 7, 8 or
At 2:55 PM -0500 1/11/10, Rick Dwyer wrote:
I have been asked to further modify the value to the nearest half cent.
So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
If it ends in 3, 4, 5, 6 it gets rounded to 5. And if it 7, 8 or 9
it gets rounded up to full cents.
Can th
On Mon, Jan 11, 2010 at 02:55:33PM -0500, Rick Dwyer wrote:
> I have been asked to further modify the value to the nearest half cent.
>
> So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
> If it ends in 3, 4, 5, 6 it gets rounded to 5. And if it 7, 8 or 9 it
> gets rounded up
I have been asked to further modify the value to the nearest half cent.
So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
If it ends in 3, 4, 5, 6 it gets rounded to 5. And if it 7, 8 or 9 it
gets rounded up to full cents.
Can this be done fairly easily? Not knowing PHP w
$newprice = sprintf("$%.2f", 15.109);
On Sun, Jan 10, 2010 at 8:36 PM, Rick Dwyer wrote:
> Hello List.
>
> Probably an easy question, but I am not able to format a number to round up
> from 3 numbers after the decimal to just 2.
>
> My code looks like this:
>
> $newprice = "$".number_format($ol
Testing this out a little:
matt...@mumin:~$ php -r 'echo "\$".number_format(0.109, 2, ".", ",")."\n";'
$0.11
matt...@mumin:~$ php -r 'echo "$".number_format(0.109, 2, ".", ",")."\n";'
$0.11
matt...@mumin:~$ php -r 'echo "$".number_format("0.109", 2, ".",
",")."\n";'
$0.11
I think the $ should
Hello List.
Probably an easy question, but I am not able to format a number to
round up from 3 numbers after the decimal to just 2.
My code looks like this:
$newprice = "$".number_format($old_price, 2, ".", ",");
and this returns "$0.109" when I am looking for "$0.11".
I tried:
$newprice
\n";
}
wont this do ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 07/30/2009 06:29 PM, Skip Evans wrote:
Jim Lucas wrote:
Skip Evans wrote:
Hey all,
Am I brain fading or what? I'm so used to formatting text in tables for
HTML display I can't think of how to do it for a plain text file.
I just need to create a columned table of names and addresses type
st
Skip Evans wrote:
Jim Lucas wrote:
Skip Evans wrote:
Hey all,
Am I brain fading or what? I'm so used to formatting text in tables for
HTML display I can't think of how to do it for a plain text file.
I just need to create a columned table of names and addresses type
stuff... sprintf?
or a li
Jim Lucas wrote:
Skip Evans wrote:
Hey all,
Am I brain fading or what? I'm so used to formatting text in tables for
HTML display I can't think of how to do it for a plain text file.
I just need to create a columned table of names and addresses type
stuff... sprintf?
or a little str_pad on ea
Skip Evans wrote:
> Hey all,
>
> Am I brain fading or what? I'm so used to formatting text in tables for
> HTML display I can't think of how to do it for a plain text file.
>
> I just need to create a columned table of names and addresses type
> stuff... sprintf?
or a little str_pad on each vari
Hey all,
Am I brain fading or what? I'm so used to formatting text in
tables for HTML display I can't think of how to do it for a
plain text file.
I just need to create a columned table of names and addresses
type stuff... sprintf?
--
Skip Evans
Big Sky
Ford, Mike wrote:
> On 04 June 2009 19:09, PJ advised:
>
>
>> Nitsan Bin-Nun wrote:
>>
From my experience I tend to use a difference ID for the
>> body tag, for
>>
>>> instance and then format it in my CSS using ID
>>> reference: #homepage .classname {
>>> col
Peter Ford wrote:
> PJ wrote:
>
>> tedd wrote:
>>
>>> At 3:58 PM -0400 6/4/09, PJ wrote:
>>>
tedd wrote:
> Style sheets are meant simplify things so decide on how you want
> things to look uniformly throughout your site and then stick with it.
>
On 04 June 2009 19:09, PJ advised:
> Nitsan Bin-Nun wrote:
>>> From my experience I tend to use a difference ID for the
> body tag, for
>> instance and then format it in my CSS using ID
>> reference: #homepage .classname {
>> color: blue;
>> }
>>
>> This way you can use a default format fo
At 10:23 AM +0100 6/5/09, Peter Ford wrote:
PJ wrote:
> tedd wrote:
>> First you figure out a layout, then you populate it. You don't pick a
>> layout, populate it and then change the layout.
>>
If only it were that simple.
When one is developing, one is always changing. And even when you'
At 4:54 PM -0400 6/4/09, PJ wrote:
tedd wrote:
> That's simply an example of not thinking things out before you write
the code.
First you figure out a layout, then you populate it. You don't pick a
> layout, populate it and then change the layout.
>
>
If only it were that simple.
When on
PJ wrote:
> tedd wrote:
>> At 3:58 PM -0400 6/4/09, PJ wrote:
>>> tedd wrote:
>>>
>>> > Style sheets are meant simplify things so decide on how you want
things to look uniformly throughout your site and then stick with it.
There's really no good reason to keep changing things throughou
tedd wrote:
> At 3:58 PM -0400 6/4/09, PJ wrote:
>> tedd wrote:
>>
>> > Style sheets are meant simplify things so decide on how you want
>>> things to look uniformly throughout your site and then stick with it.
>>> There's really no good reason to keep changing things throughout a
>>> site.
>>>
At 3:58 PM -0400 6/4/09, PJ wrote:
tedd wrote:
> Style sheets are meant simplify things so decide on how you want
things to look uniformly throughout your site and then stick with it.
There's really no good reason to keep changing things throughout a site.
Cheers,
tedd
Maybe I'm just
tedd wrote:
> At 2:08 PM -0400 6/4/09, PJ wrote:
>> Nitsan Bin-Nun wrote:
>>> >From my experience I tend to use a difference ID for the body tag,
>>> for
>>> instance and then format it in my CSS using ID
>>> reference:
>>> #homepage .classname {
>>>color: blue;
>>> }
>>>
>>> This wa
At 2:08 PM -0400 6/4/09, PJ wrote:
Nitsan Bin-Nun wrote:
>From my experience I tend to use a difference ID for the body tag, for
instance and then format it in my CSS using ID
reference:
#homepage .classname {
color: blue;
}
This way you can use a default format for all the pages
Nitsan Bin-Nun wrote:
> >From my experience I tend to use a difference ID for the body tag, for
> instance and then format it in my CSS using ID
> reference:
> #homepage .classname {
> color: blue;
> }
>
> This way you can use a default format for all the pages and create minor (or
> major)
>From my experience I tend to use a difference ID for the body tag, for
instance and then format it in my CSS using ID
reference:
#homepage .classname {
color: blue;
}
This way you can use a default format for all the pages and create minor (or
major) changes in the theme in no time :)
I w
Andrew Ballard wrote:
> On Thu, Jun 4, 2009 at 12:54 PM, PJ wrote:
>> This may not be strictly php but I think is may be relevant.
>> Were I to use a different css file for every page (that is slightly
>> different), would that affect performance?
>> It seems to me that might be a way of simplifyi
On Thu, Jun 4, 2009 at 12:54 PM, PJ wrote:
> This may not be strictly php but I think is may be relevant.
> Were I to use a different css file for every page (that is slightly
> different), would that affect performance?
> It seems to me that might be a way of simplifying and certainly speeding
>
This may not be strictly php but I think is may be relevant.
Were I to use a different css file for every page (that is slightly
different), would that affect performance?
It seems to me that might be a way of simplifying and certainly speeding
up development (design-wise, anyway) when using css. A
[EMAIL PROTECTED] wrote:
I would like to format the output of a PHP page into a single line and use
gzip compression too.
I know that i can use something like this to get in a single line ( will
workout on this function later to remove spaces ).
And gzip compression is used with
Is there a
Hello,
I would like to format the output of a PHP page into a single line and use
gzip compression too.
I know that i can use something like this to get in a single line ( will
workout on this function later to remove spaces ).
And gzip compression is used with
Is there a way to "mix" those
If it is stored in a database, you may want to convert within your query:
MySQL: date_format
Postgresql: to_char
If it's just in a text file, PHP's date() function should do it:
http://php.net/date
I dunno if there's a nifty constant for the format you want, but you
could always mess with mktime
t
> Subject: Re: [PHP] Formatting time :/
>
> Steven Macintyre wrote:
> > I am unable to find out how to do this ... or what the format is
> "called"
> > bar zulu format
> >
> > I have standard 00:00:00 time stored ... and wish to display it
> as 00h
Steven Macintyre wrote:
I am unable to find out how to do this ... or what the format is "called"
bar zulu format
I have standard 00:00:00 time stored ... and wish to display it as 00h00 ...
has anyone done this with php ... can you point me to right page etc ...
What is that format called?
h
Hi all,
I am unable to find out how to do this ... or what the format is "called"
bar zulu format
I have standard 00:00:00 time stored ... and wish to display it as 00h00 ...
has anyone done this with php ... can you point me to right page etc ...
What is that format called?
Kind Regards,
S
Thanks to everyone for their suggestions, I used the nl2br function in the
end, and it works perfectly.
On 02/10/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Mon, October 2, 2006 4:13 pm, tedd wrote:
> Why not use nl2br() to show the data in the browser and leave the
> data "as-is" in the dB
On Mon, October 2, 2006 4:13 pm, tedd wrote:
> Why not use nl2br() to show the data in the browser and leave the
> data "as-is" in the dB?
Apparently I typed too much, cuz that's exactly what I said, or meant
to say...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a
At 3:51 PM -0500 10/2/06, Richard Lynch wrote:
Don't "pollute" your raw data (the newlines) with a very
media-specific formatting code ("") -- Keep your raw data pure
and clean, and format for the destination when you send it there, not
when you store it.
There *might* be some egregious examples
On Mon, October 2, 2006 12:08 pm, Toby Osbourn wrote:
> Sorry to plague you with a question that should have a simple answer,
> but I
> can't find said answer anywhere (probably looking for the wrong things
> in
> the wrong places!)
>
> Basically I want to allow a user to input a string via a form
At 6:08 PM +0100 10/2/06, Toby Osbourn wrote:
Sorry to plague you with a question that should have a simple answer, but I
can't find said answer anywhere (probably looking for the wrong things in
the wrong places!)
Basically I want to allow a user to input a string via a form into a
database, I
How is the field set in the database - is it CHAR/VARCHAR or TEXT?
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Sorry to plague you with a question that should have a simple answer, but I
can't find said answer anywhere (probably looking for the wrong things in
the wrong places!)
Basically I want to allow a user to input a string via a form into a
database, I have the code to do that and it works almost 10
date("a"); > output = AM
Is there any easy way to change the formatting of the output of above
from "am" to "a.m." in order to conform to AP style?
Something like this below would work, but I'm wondering if there is
something I could do differently in the date() fuction to make it work:
On Thu, March 23, 2006 5:51 pm, Todd Cary wrote:
> I have a field, Start_Time, in a MySQL DB. Since it is not a
> TimeStamp, I believe I cannot use date(), correct?
>
> I would like to format 09:00:00 to 9:00 AM.
>
> If I convert the 09:00:00 with the strtotime(), I get a couple of
> extra minutes
Hi,
Friday, March 24, 2006, 9:51:48 AM, you wrote:
TC> I have a field, Start_Time, in a MySQL DB. Since it is not a
TC> TimeStamp, I believe I cannot use date(), correct?
TC> I would like to format 09:00:00 to 9:00 AM.
TC> If I convert the 09:00:00 with the strtotime(), I get a couple of
TC>
I have a field, Start_Time, in a MySQL DB. Since it is not a
TimeStamp, I believe I cannot use date(), correct?
I would like to format 09:00:00 to 9:00 AM.
If I convert the 09:00:00 with the strtotime(), I get a couple of
extra minutes added.
Suggestions are welcomed
Todd
--
PHP Gener
Hi Scott,
How do you distinguish between a value filled with zeroes and a value
with 0 in both decimal positions?
For example, why is 3145900 expressed as 3,145.90, and not 31,459.00?
Cheers,
David Grant
Scott Parks wrote:
> Hi-
>
> I have a number that I am trying to format. It is data comi
Hi-
I have a number that I am trying to format. It is data coming from a
main frame and
has 8 characters assigned to it (6 and two decimal places). I have
zerofill set up in
MySQL on this field and am working on the best way to display the
number.
Currently I have this:
$sOutput = numb
On 8/16/2005 9:59:30 PM, Scott Noyes ([EMAIL PROTECTED]) wrote:
> It's not clear to me how strict you want to be regarding the
> formatting. Are you trying to keep scenes together on each line, or
> just dump everything and let it wrap where it needs to? Perhaps you
> could handcode a sample and
It's not clear to me how strict you want to be regarding the
formatting. Are you trying to keep scenes together on each line, or
just dump everything and let it wrap where it needs to? Perhaps you
could handcode a sample and post a link. I'd also guess that you
could make good use of CSS, specif
Hi,
My database has a table called movies which has data like this:
flick_name ,flick_cover, part_url
flick_name is the name of the movie, the movie is cut into several pieces
for faster downloads
part_url is the full path to each of the pieces
eg:
home movie 1 ,a.gif, http://movieserver.com/s
Good point. Only problem is, if someone hit enter a-million times,
you would end up with a-million spaces where the "\n" characters were.
To take care of that repetition, maybe something like:
while (strpos($textarea_text, "\n\n")) {
.
}
would be one way you could do it.
$new_str =
On Mon, June 13, 2005 12:06 pm, Paul Nowosielski said:
> I'm having a perplexing problem. I'm gather data through a
> html from field and dumping it to MySQL.
>
> I want to display the data as a long string with no carriage returns or
> line breaks in a dhtml div window.
What styles have you ap
Right.. But the browser also should be ignoring the carriage returns
as well, which makes me think the div is set to "white-space: pre;" or
something. He said the text is being formatted in a div exactly how
it is entered into the system. By default, a div does not render any
carriage returns.
> Good point. Only problem is, if someone hit enter a-million times,
> you would end up with a-million spaces where the "\n" characters were.
> To take care of that repetition, maybe something like:
>
>
> while (strpos($textarea_text, "\n\n")) {
> .
> }
>
>
> would be one way you cou
Good point. Only problem is, if someone hit enter a-million times,
you would end up with a-million spaces where the "\n" characters were.
To take care of that repetition, maybe something like:
while (strpos($textarea_text, "\n\n")) {
.
}
would be one way you could do it.
On 6/13/05
> Use the PHP str_replace function before writing it to the DB. Replace
> all "\n" characters with an empty string "".
>
> http://us2.php.net/manual/en/function.str-replace.php
I think it might be better to replace all "\n" characters with spaces " ",
otherwise you will end up with sentences tha
Use the PHP str_replace function before writing it to the DB. Replace
all "\n" characters with an empty string "".
http://us2.php.net/manual/en/function.str-replace.php
On 6/13/05, Paul Nowosielski <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm having a perplexing problem. I'm gather data through a
Hi,
I'm having a perplexing problem. I'm gather data through a
html from field and dumping it to MySQL.
I want to display the data as a long string with no carriage returns or
line breaks in a dhtml div window.
The problem I'm have is that the form data is remembering the carriage
returns. I
Hi
First, execute your query
unset($fail);
$res=mysql_query($sql,$dbhandle) or $fail=true;
if( (isset($fail)) || (!(is_resource($res)) )
echo "There was a problem with the execution of the query";
if(mysql_num_rows($res)==0)
echo "The query resulted in ZERO records";
#now that's out of the way
I am allowing our members to upload pictures and they can choose which
category the pictures go under, the first category "public" is made for
them.
When I sql the DB I call it like this: select picture_names<,more
fields> from where member_id= order by category.
which i display something lik
Hi,
Am having a bit of logic problem figuring this outI just think the easy
solution would cost me in having too many
sql queries from my script so there has to be a easier way.
I am allowing our members to upload pictures and they can choose which
category the pictures go under,
the first ca
Burhan Khalid wrote:
Jacques wrote:
Can I format an e-mail message with html tags inside the mail()
function? If not, how can I go about it? I would like to format the
layout of the e-mail message using tables, colors and perhaps images.
Please, FFS RTFM > http://www.php.net/manual/en/function.m
Jacques wrote:
Can I format an e-mail message with html tags inside the mail() function?
If not, how can I go about it? I would like to format the layout of the
e-mail message using tables, colors and perhaps images.
Please, FFS RTFM > http://www.php.net/manual/en/function.mail.php
--
PHP General
Can I format an e-mail message with html tags inside the mail() function?
If not, how can I go about it? I would like to format the layout of the
e-mail message using tables, colors and perhaps images.
Regards - Jacques
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
Sunday, April 25, 2004, 3:15:25 PM, you wrote:
AB> ok sorry but since i never used preg_* before i dont quite get what some of
AB> this stuff means. i looked at the doc page for it but it doesnt make mention
AB> at all of what \d, \w, \s or any of those things mean... i only assume that
AB> \
1 - 100 of 218 matches
Mail list logo