Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread 9el
I have pagination set up and the number for pages "next" has a link but the "next" does not. I have experimented with all sorts of configurations of the code but the only thing that works (and this is totally "off the wall") is to do this *$Count* = *mysql_num_rows($results);* $Count1=*$Count++;* /

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Nitsan Bin-Nun
That's what I was just about saying, in addition try to add the HTML entities to the regular expression as well: $string = preg_replace('/(?:& #34;|")(.*?)(?:& #34;|")/', '"\\1"', $string); Also if you don't to get caught by the HTML validator you better surround the color name with double quotes

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread Phpster
What parameters are you pasing in the link? That will be the telling point of what you are doing wrong. You could pass the search params ( though these are best kept in a session or cookie ) and the offset counter to get the next block of results. Sorry for top posting. Bastien Sent from

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread tedd
At 1:40 PM -0400 4/25/09, Andrew Hucks wrote: If I have something like $string = '"hello" there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like "hello" there. Arrggg. Don't use: ""hello"" The font tag is dead and embedded styling should mov

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Ashley Sheridan
On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > At 1:40 PM -0400 4/25/09, Andrew Hucks wrote: > >If I have something like $string = '"hello" there'; (the word hello is > >in double quotes, if you can't see it), how would I output it as > >something like "hello" there. > > Arrggg. > > Don't use:

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Robert Cummings
On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > At 1:40 PM -0400 4/25/09, Andrew Hucks wrote: > > >If I have something like $string = '"hello" there'; (the word hello is > > >in double quotes, if you can't see it), how would I output it

[PHP] Re: Formating Numbers

2009-04-26 Thread Nathan Rixham
Gary wrote: I cant seem to get this to work for me. I want the number to be formated to money (us, 2 decimal points). /** * returns 4.3 as $4.30 (formats us dollars) * * @param $amount * @return string */ function us_dollar_format( $amount ) { return ( '$' . number_format($amount,

[PHP] Re: Help with scandir()

2009-04-26 Thread Nathan Rixham
Deivys Delgado Hernandez wrote: Hi, I'm having problems when i try to use the function scandir() in a Novell Netware Volumen or a Windows Shared Folder they both are mapped as a windows network drive, so i suppose i could access them as local drive, but i can't. instead i receive this message:

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread tedd
At 9:47 AM -0400 4/26/09, Robert Cummings wrote: On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > > > > I'd go further on that and say don't call your class 'red', as it > doesn't do anything for semantic code, but that's just me

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Ashley Sheridan
On Sun, 2009-04-26 at 11:40 -0400, tedd wrote: > At 9:47 AM -0400 4/26/09, Robert Cummings wrote: > >On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > > > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > > > > ?> > > > > > > > I'd go further on that and say don't call your class 'r

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Robert Cummings
On Sun, 2009-04-26 at 11:40 -0400, tedd wrote: > At 9:47 AM -0400 4/26/09, Robert Cummings wrote: > >On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > > > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > > > > ?> > > > > > > > I'd go further on that and say don't call your class 'r

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread tedd
At 11:59 AM -0400 4/26/09, Robert Cummings wrote: On Sun, 2009-04-26 at 11:40 -0400, tedd wrote: > While it might not fit with the purest css, it works for me. YMMV. :-) Your thinking is flawed. Yes you could have a class called center and it does exactly that... center the text. However to m

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Sudheer Satyanarayana
Robert Cummings wrote: I was about to say the same thing *lol*. tis true though, the class should be "doubleQuoted" or something similar. What happens when they decide it should be blue? Aren't CSS class names supposed to be in lower case? I would go with something like "double_quoted". spa

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Robert Cummings
On Sun, 2009-04-26 at 22:52 +0530, Sudheer Satyanarayana wrote: > Robert Cummings wrote: > > I was about to say the same thing *lol*. tis true though, the class > > should be "doubleQuoted" or something similar. What happens when they > > decide it should be blue? > > > > > Aren't CSS class name

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread PJ
9el wrote: > I have pagination set up and the number for pages "next" has a link but > the "next" does not. I have experimented with all sorts of > configurations of the code but the only thing that works (and this is > totally "off the wall") is to do this > *$Count* = *mysql_num_rows($results);*

[PHP] Re: Formating Numbers

2009-04-26 Thread Gary
Sorry for the delay in response. I was able to figure the number_format() function out. Thanks for all your responses. Gary ""Gary"" wrote in message news:21.39.63007.75193...@pb1.pair.com... >I cant seem to get this to work for me. I want the number to be formated >to money (us, 2 decimal

Re: RES: [PHP] inexplicable behaviour SOLVED

2009-04-26 Thread PJ
kranthi wrote: > if $Count1 is never referenced after this, then certainly this > assignment operation is redundent. but assignment is not the ONLY > operation of this statement. if u hav not noticed a post increment > operator has been used which will affect the value of $Count as well, > and this

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread PJ
> Look for "Pagination with PHP + MySQL" and watchit > > > http://www.google.com/url?sa=t&source=web&ct=res&cd=10&url=http%3A%2F%2Fwww.bestechvideos.com%2F2008%2F07%2F02%2Fsampsonvideos-php-pagination-part-2&ei=ohn0SdnlL8KLkAWQrNTbCg&usg=AFQjCNEGKOIG3791BpgeVqCiiq5-cikbRA > > Dont miss this Sampso

Re: [PHP] MySQL -- finding whether there's a transaction started

2009-04-26 Thread Chris
Bogdan Stancescu wrote: On 24-Apr-09 03:45, Chris wrote: I don't think mysql has any way of finding that out. If you're using an abstraction layer, it's easy enough in code - though rollback's are a little harder - should they do a complete rollback or just to a savepoint? Thank you for taking

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread PJ
Phpster wrote: > What parameters are you pasing in the link? That will be the telling > point of what you are doing wrong. You could pass the search params ( > though these are best kept in a session or cookie ) and the offset > counter to get the next block of results. Actually, I am trying to use

[PHP] CamelCase conversion to proper_c_style

2009-04-26 Thread Paul M Foster
I know it's probably heresy for a lot of coders, but does anyone know a function or class or regexp or somesuch which will scan through a PHP file and convert all the CamelCase code into proper C-type code? That is, "CamelCase" gets converted to "camel_case". I snagged a bunch of someone else's PHP

Re: [PHP] MySQL -- finding whether there's a transaction started

2009-04-26 Thread Lester Caine
Bogdan Stancescu wrote: Hello list, I'm developing a library and would need to know if the code calling my library has already started a MySQL transaction or not. I want to know whether I should start one or use savepoints instead -- starting a transaction if one is already in progress commits t