Closed while loop

Closed broken while loop in php_encode