Php Function Pass Array To A Function For The Perimeter