- var_dump: documentation ( source)
- array_combine: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$string = "username............: username
home directory......: 00/username
mail storage server.: mail-server.example.net
status..............: active
quota size..........: 1000.000 megabytes
quota count.........: no quota
forward to..........: username@example.com
full name...........: testing:testing
offers..............:";
preg_match_all('/\h*([a-z ]+)\.*:\h*(.*)/i', $string, $matches);
$values = array_combine($matches[1], $matches[2]);
var_dump($values);