Re: [PHP] 9970318527584

2011-02-18 Thread Robert Cummings
On 11-02-18 10:08 PM, John Taylor-Johnston wrote: 9970318527584 Could this number refer to a date()? In late 2009? How could I calculate it? Doesn't look like it... echo date( 'Y-m-d H:i:s', 9970318527584 )."\n"; Not even a JavaScript millisecond timestamp: echo date( 'Y-m-d H:i:s',

[PHP] 9970318527584

2011-02-18 Thread John Taylor-Johnston
9970318527584 Could this number refer to a date()? In late 2009? How could I calculate it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Howdy (new in here)

2011-02-18 Thread D. Dante Lorenso
On 2/18/11 8:39 AM, Kirk Bailey wrote: Oh hey, that's a good point. All the stuff i saw so far indented 2 spaces. WHY? Can I just indent a TAB if my editor permits this? indenting 4 spaces (2 nests) is easy, but suppose I hit one extra space- not enough difference to be really noticeable. Let's t

Re: [PHP] Regex pattern for preg_match_all

2011-02-18 Thread Tommy Pham
@Simon, Thanks for explaining about the [^href]. I need to read up more about greediness. I thought I understood it but guess not. @Peter, I tried your pattern but it didn't capture all of my new test cases. Also, it captures the single/double quotes in addition to the fragments inside the hre

Re: [PHP] Regex pattern for preg_match_all

2011-02-18 Thread Peter Lind
On 18 February 2011 22:36, Tommy Pham wrote: > Hi folks, > > This is not directly relating to PHP but it's Friday so I'm gonna give > it a shot :).  Would someone please help me figure out why my regex > pattern doesn't work.  Below is the code and sample data: > > $html = << href="http://images.

Re: [PHP] Regex pattern for preg_match_all

2011-02-18 Thread Simon J Welsh
As far as I can tell, your problem lies in [^href]*. That will match any characters other than h, r, e or f, not anything other than the string href. Consider replacing it with [^>]*?. The ? makes it non-greedy so it will stop as soon as it can (when it matches the first href) rather than as lat

[PHP] Regex pattern for preg_match_all

2011-02-18 Thread Tommy Pham
Hi folks, This is not directly relating to PHP but it's Friday so I'm gonna give it a shot :). Would someone please help me figure out why my regex pattern doesn't work. Below is the code and sample data: $html = <Images ht

Re: [PHP] Displaying Results

2011-02-18 Thread Tommy Pham
On Tue, Feb 15, 2011 at 12:19 PM, Peter Lind wrote: > On 15 February 2011 20:28, Ethan Rosenberg wrote: >> Dear List - >> > > Ask google you should > Plenty of advice you'll find > we won't do your homework > > Regards > Peter > +1. Ethan, you should read this [1] first. Regards, Tommy [1] ht

Re: [PHP] improve speed of PHP answers

2011-02-18 Thread Tommy Pham
On Thu, Feb 10, 2011 at 5:18 AM, Alex Nikitin wrote: > > One, while sorting and limiting, and improving mysql queries is a great way > to increase application performance, dont forget that sql is not a > programming language and as such certain tasks should not be done in > queries, any complex

Re: [PHP] Mysql 5.5 and PHP Mysql API Version 5.1.41

2011-02-18 Thread Tommy Pham
BTW, how is the traffic on your site? What's the max connection limit and timeout set on the MySQL server? [1] from searching [2] might be the solution to your problem. Good luck, Tommy [1] http://forums.mysql.com/read.php?52,364493,364831#msg-364831 [2] http://www.google.com/search?q=php+SQLST

Re: [PHP] New to list and to PHP

2011-02-18 Thread Adam Richardson
On Fri, Feb 18, 2011 at 2:03 PM, Pete Woodhead wrote: > Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very > new to code writing. > Thought this would be a good way to learn good habits as well as good code > writing. > Looking forward to learning and participating. > Wel

[PHP] Re: [SOLVED] [PHP] how to dynamically generate list of arguments to pass to array_diff

2011-02-18 Thread Mari Masuda
On Feb 18, 2011, at 12:03 PM, Simon J Welsh wrote: > > On 19/02/2011, at 8:07 AM, Mari Masuda wrote: >> My question is is there a way to call the built-in array_diff with a >> dynamically generated list of arguments? I was thinking maybe there would >> be a way to do this with variable variab

Re: [PHP] Mysql 5.5 and PHP Mysql API Version 5.1.41

2011-02-18 Thread Tommy Pham
On Tue, Feb 15, 2011 at 9:57 AM, Matthias Laug wrote: > Hey there, > > I've just migrated to Mysql 5.5 from source and it works like a charm. Still > every now and then (in intervals of approximatly an hour) I get the following > error: > > Error: Uncaught exception 'PDOException' with message '

[PHP] how to dynamically generate list of arguments to pass to array_diff

2011-02-18 Thread Mari Masuda
Hello, I have an array of arrays like this: --- [array_of_arrays:private] => Array ( [0] => Array ( [0] => 2 [1] => 4 [2] => 5 [3] => 17 [4] => 80

[PHP] New to list and to PHP

2011-02-18 Thread Pete Woodhead
Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very new to code writing. Thought this would be a good way to learn good habits as well as good code writing. Looking forward to learning and participating.

[PHP] Connection Handling - unreliable at best?

2011-02-18 Thread James Green
Been reading through http://uk.php.net/manual/en/features.connection-handling.php and trying to implement a solution using it. So far the documented behaviour rarely occurs. This code is a minimal test case: http://codepad.org/GqNlcWiM I run this behind Apache 2.2 with PHP 5.3 on Linux. The in-li

Re: [PHP] Howdy (new in here)

2011-02-18 Thread Robert Cummings
On 11-02-16 06:36 PM, Tamara Temple wrote: On Feb 15, 2011, at 11:23 PM, Brian Waters wrote: On Tue, Feb 15, 2011 at 11:46 PM, Tamara Temple wrote: I was unlucky enough to find someone who coded a function that went on for 30 pages one (this was in C, not PHP) and *that* was hard to untangl

Re: [PHP] Howdy (new in here)

2011-02-18 Thread Kirk Bailey
Oh hey, that's a good point. All the stuff i saw so far indented 2 spaces. WHY? Can I just indent a TAB if my editor permits this? indenting 4 spaces (2 nests) is easy, but suppose I hit one extra space- not enough difference to be really noticeable. Let's talk about indentation in php for a mo

Re: [PHP] assistance

2011-02-18 Thread Daniel Brown
On Fri, Feb 18, 2011 at 06:06, Michael Simiyu wrote: > am using jcart but would like to customize the gateway.php file to use > another payment gateway instead of paypalany help from the community ? Doubtful. Contact someone at jcart instead --- it's not related to general PHP stuff. --

[PHP] assistance

2011-02-18 Thread Michael Simiyu
am using jcart but would like to customize the gateway.php file to use another payment gateway instead of paypalany help from the community ?