Почти - вы должны удалить %
. Вот пример, который работал локально с PHP 5.3.4:
$foo = array("1" => "First", "2" => "Second");
foreach($foo as $key => & $element) {
$element = $element . " With More Text Attached!\n";
}
print_r($foo);
приводит к
Array (
[1] => First With More Text Attached!
[2] => Second With More Text Attached!
)