How to write Factorial program using for loop and recursion in php?