Reduce the array to a single element with the given operation | Function to return the final element ; Driver code
< ? php function getFinalElement ( $ n ) { $ finalNum = 0 ; for ( $ finalNum = 2 ; ( $ finalNum * 2 ) <= $ n ; $ finalNum *= 2 ) ; return $ finalNum ; } $ N = 12 ; echo getFinalElement ( $ N ) ; ? >