Use array_map() and implode() to avoid long-winded loops