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 from the loop
foreach(self::$timeGap as $gap)
self::$timeGap is a list of pairs of numbers.

>  if( isset($secondsGap[1]) ) {
Trying to get the second element .. which will never happen if you
haven't added an element before the snipped you pasted here.

>          $gapName = $secondsGap[0]."to".$secondsGap[1];
>  } else {
>          $gapName = $secondsGap[0];
>  }
[some-code]

I'm quite unsure what you want to do here. If you'd update the first
line as following it would always trigger the first condition:
$secondsGap = array($gap[0] * 60, $gap[1] * 60);
What this code is doing perfectly in PHP5.3 is generating the text string to display for each time period listed in the array of pairs of numbers ( some with a 'blank' second number and what the code returns is a string of the format '(number1)to(number2)' or simply '(number1)' - something fairly standard in PHP? But the nanny message says it need to be re-writen, the question is 'How?' :(

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to