php-general Digest 3 Jul 2012 18:24:46 -0000 Issue 7876

2012-07-03 Thread php-general-digest-help
php-general Digest 3 Jul 2012 18:24:46 - Issue 7876 Topics (messages 318382 through 318389): Re: How does this code work? 318382 by: Jim Lucas 318383 by: Robert Williams 318385 by: tamouse mailing lists Re: PDO Prevent duplicate field names? 318384 by:

Re: [PHP] How does this code work?

2012-07-03 Thread Robert Williams
On Jul 2, 2012, at 22:15, Jim Lucas li...@cmsws.com wrote: I think you missed something here... The above function uses strtr() not strstr() Wow. I knew there had to be a simple, logical explanation (there was), that it would likely be one of those stupid things that I'd spot in two seconds

Re: [PHP] PDO Prevent duplicate field names?

2012-07-03 Thread tamouse mailing lists
On Mon, Jul 2, 2012 at 5:38 PM, Scott Baker bak...@canbytel.com wrote: It was my mistake, and the SQL was easily fixed. But it woulda been nice to have PHP realize there was a dupe when it was building that array to return to me. This is just not a province of PHP. What sort of behaviour would

Re: [PHP] How does this code work?

2012-07-03 Thread tamouse mailing lists
On Tue, Jul 3, 2012 at 2:31 AM, Robert Williams rewilli...@thesba.com wrote: On Jul 2, 2012, at 22:15, Jim Lucas li...@cmsws.com wrote: Hmm, I wonder if those thirty years are having a different sort of impact on me, in the form of decaying eyesight I've had to tweak up the default fonts

Re: [PHP] Destructor not called when extending SimpleXMLElement

2012-07-03 Thread Nick Chalk
Thanks Erwin and Matijn. On 2 July 2012 17:32, Matijn Woudt tijn...@gmail.com wrote: This is most likely a bug in PHP. A deconstructor is called when there are no references left to the object. Since this class uses the libXML library, it is likely that there are still references from the

Re: [PHP] Way to test if variable contains valid date

2012-07-03 Thread shiplu
I want to thank you, Daniel, for this help. - I was looking for an isarray type function There is no such function or facility in php. However you can check date in string by DateTime object also try { $date = new DateTime('2000-01-01'); } catch (Exception $e) { echo

Re: [PHP] Way to test if variable contains valid date

2012-07-03 Thread Erwin Poeze
Or you could use a regular expression: $probe = '2000-01-01'; $found = preg_match('/(19|20)\d\d[- \.](0[1-9]|1[012])[- \.](0[1-9]|[12][0-9]|3[01])/', $probe); var_dump($found==1); Erwin 2012/7/3 shiplu shiplu@gmail.com I want to thank you, Daniel, for this help. - I was looking for

[PHP] exec to launch putty.exe for telnet

2012-07-03 Thread Devang Patel
Hello Experts, I have putty.exe on my desktop so if I will go to command prompt and then to C:\Documents and Settings\user\Desktop location and execute following command it will launch the Putty window of telnet connection to server specified: putty.exe telnet://10.3.215.15/ I am trying to

Re: [PHP] exec to launch putty.exe for telnet

2012-07-03 Thread Matijn Woudt
On Tue, Jul 3, 2012 at 8:24 PM, Devang Patel devan...@gmail.com wrote: Hello Experts, I have putty.exe on my desktop so if I will go to command prompt and then to C:\Documents and Settings\user\Desktop location and execute following command it will launch the Putty window of telnet