Something like this?
$str = "word1:value1
word2:value2
word3:value3
word4:value4
word5:value5";
$temp_array = explode("\n", $str);
$array = array();
foreach($temp_array as $value) {
$temp = explode(':', $value);
$array[$temp[0]] = $temp[1];
}
Note that this script will work if you edit the $str on Unix or Windows, NOT Mac - Mac uses a CR as a line ending, so my first explode() statement wouldn't see it as a line break.
If you wanted to make sure that all formats of line breaks are accepted (CR, LF, CRLF), you would replace that $temp_array declaration with something like this:
$temp_array = split("\r|\n|\r\n", $str);