Utility function to calculate double factorial of a number
< ? php function doubleFactorial ( $ n ) { $ fact = 1 ; for ( $ i = 1 ; $ i <= $ n ; $ i = $ i + 2 ) { $ fact = $ fact * $ i ; } return $ fact ; }