Error assigning to a variable

How could I get around this problem?

Assets/Chat/Chat.cs(140,25): error CS1656: Cannot assign to `entry’ because it is a ‘foreach iteration variable’

foreach(string entry in scrollingNotices) {
			GUILayout.BeginHorizontal();
			entry = GUILayout.TextField(entry);

The variable entry is readonly: it’s assigned internally only by the foreach code, and you can’t modify it. If you really want to allow edition of scrollingNotices elements via GUI, the code must be something like this:

for (int i=0; i<scrollingNotices.Length; i++){
  GUILayout.BeginHorizontal();
  scrollingNotices _= GUILayout.TextField(scrollingNotices*);*_


But if you just want to display the elements of scrollingNotices, keep your original code and use GUILayout.Label instead:
foreach (string entry in scrollingNotices) {
GUILayout.BeginHorizontal();
GUILayout.Label(entry);