While Loop Array Php Format String Python