php-general Digest 12 Mar 2012 13:38:09 -0000 Issue 7724

2012-03-12 Thread php-general-digest-help
php-general Digest 12 Mar 2012 13:38:09 - Issue 7724 Topics (messages 316989 through 316992): Re: Have little enough hair as it is ... 316989 by: Matijn Woudt 316990 by: Lester Caine 316991 by: Simon Schick 316992 by: Lester Caine Administrivia: To

php-general Digest 13 Mar 2012 01:54:43 -0000 Issue 7725

2012-03-12 Thread php-general-digest-help
php-general Digest 13 Mar 2012 01:54:43 - Issue 7725 Topics (messages 316993 through 317000): Re: questions about $_SERVER 316993 by: Daniel Brown 316997 by: Tedd Sperling 316998 by: Jim Giner 316999 by: Tim Streater Re: Have little enough hair as it is ...

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Simon Schick
2012/3/12 Lester Caine les...@lsces.co.uk: More irritating is 'Notice: Array to string conversion' which are coming up all over the place. I can understand what the problem is ... but trying to remove the notices is more challenging ... $secondsGap[] = array($gap[0] * 60, $gap[1] * 60); if(

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Lester Caine
Simon Schick wrote: I suggest that all done with this variable before is not of interest ... Assuming this, I'd say the following: $secondsGap[] = array($gap[0] * 60, $gap[1] * 60); Implicit initializing of an array that has the following structure: array( array(int, int) ); OK $gap comes

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Daniel Brown
On Sun, Mar 11, 2012 at 14:16, Tedd Sperling tedd.sperl...@gmail.com wrote: As to placing an additional requirement (i.e., being predefined) on the definition as to what constitutes a SuperGlobal is outside my understanding. As such, I must defer to the PHP Manual, namely:

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Jim Lucas
On 03/12/2012 06:38 AM, Lester Caine wrote: Simon Schick wrote: I suggest that all done with this variable before is not of interest ... Assuming this, I'd say the following: Right here you are creating two strings within an array within an array. My guess is you will want to replace the

Re: [PHP] Function mktime() documentation question

2012-03-12 Thread Tedd Sperling
On Mar 11, 2012, at 3:10 PM, Matijn Woudt wrote: On Sun, Mar 11, 2012 at 7:33 PM, Tedd Sperling tedd.sperl...@gmail.com wrote: Actually, this works for me: $days_in_month = date('t', mktime(0, 0, 0, $next_month, 0, $year)); But again, I don't see why I have to use next month to find the

Re: [PHP] Function mktime() documentation question

2012-03-12 Thread Ashley Sheridan
On Mon, 2012-03-12 at 15:53 -0400, Tedd Sperling wrote: On Mar 11, 2012, at 3:10 PM, Matijn Woudt wrote: On Sun, Mar 11, 2012 at 7:33 PM, Tedd Sperling tedd.sperl...@gmail.com wrote: Actually, this works for me: $days_in_month = date('t', mktime(0, 0, 0, $next_month, 0, $year));

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Tedd Sperling
On Mar 11, 2012, at 3:04 PM, Tim Streater wrote: In the following, $x is a global but not a super-global (AFAIK). ?php function echox () { global $x; echo $x; } $x = Hello world\n; echox (); ? -- Cheers -- Tim Tim: I read somewhere that using:

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Jim Giner
The purpose of the global statement within a function is to let PHP know that the usage of a var name INSIDE that function is not meant to create a NEW variable, but instead, to reference the other (global) variable being used (and perhaps already defined) in your main script. Basically it

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Tim Streater
On 12 Mar 2012 at 20:07, Tedd Sperling tedd.sperl...@gmail.com wrote: Tim: I read somewhere that using: global $x; is not recommended. Whereas, it is recommended to use: $x = $GLOBALS['x']; echo $x; Tedd, That may well be, although as I write I can't recollect having seen that

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Lester Caine
Jim Lucas wrote: Right here you are creating two strings within an array within an array. My guess is you will want to replace the $secondsGap[] with $secondsGap $secondsGap[] = array($gap[0] * 60, $gap[1] * 60); $secondsGap[] is right ... it's building an array of results ... problem