<?php
$text = array ('раз', 'два', 'три'); //не изменяет массив:
foreach ($text as $value){
$value = $value." десу \n";
echo $value;
}
//изменяет массив:
foreach ($text as $key => $value){
$text[$key] = $value." десу \n";
echo $value;
}
PD9waHAKCiR0ZXh0ID0gYXJyYXkgKCfRgNCw0LcnLCAn0LTQstCwJywgJ9GC0YDQuCcpOwovL9C90LUg0LjQt9C80LXQvdGP0LXRgiDQvNCw0YHRgdC40LI6CmZvcmVhY2ggKCR0ZXh0IGFzICR2YWx1ZSl7CgokdmFsdWUgPSAkdmFsdWUuIiDQtNC10YHRgyBcbiI7CmVjaG8gJHZhbHVlOwp9CnByaW50X3IoJHRleHQpOwoKLy/QuNC30LzQtdC90Y/QtdGCINC80LDRgdGB0LjQsjoKZm9yZWFjaCAoJHRleHQgYXMgJGtleSA9PiAkdmFsdWUpewoKJHRleHRbJGtleV0gPSAkdmFsdWUuIiDQtNC10YHRgyBcbiI7CmVjaG8gJHZhbHVlOwp9CnByaW50X3IoJHRleHQpOw==