{"id":24976,"date":"2024-10-26T04:25:13","date_gmt":"2024-10-26T04:25:13","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=24976"},"modified":"2024-11-26T08:03:15","modified_gmt":"2024-11-26T08:03:15","slug":"%ec%9c%a0%eb%8b%88%ed%8b%b0-%ea%b8%b0%ec%b4%88-%ea%b0%95%ec%a2%8c-%eb%b0%98%eb%b3%b5%eb%ac%b8-foreach","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/24976\/","title":{"rendered":"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach"},"content":{"rendered":"<p><body><\/p>\n<p>\uc548\ub155\ud558\uc138\uc694! \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 \uc720\ub2c8\ud2f0\uc5d0\uc11c \ub9e4\uc6b0 \uc911\uc694\ud55c \ud504\ub85c\uadf8\ub798\ubc0d \uac1c\ub150 \uc911 \ud558\ub098\uc778 \ubc18\ubcf5\ubb38, \ud2b9\ud788 <code>foreach<\/code> \ubb38\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubc18\ubcf5\ubb38\uc740 \uc77c\uc744 \ubc18\ubcf5\uc801\uc73c\ub85c \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uc5ec \ucf54\ub4dc\uc758 \uc720\uc6a9\uc131\uc744 \ub192\uc774\uace0, \ubc18\ubcf5\uc801\uc778 \uc791\uc5c5\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4. <code>foreach<\/code> \ubb38\uc740 \uceec\ub809\uc158(\ubc30\uc5f4, \ub9ac\uc2a4\ud2b8 \ub4f1)\uacfc \uac19\uc774 \ubc18\ubcf5\ud560 \uc218 \uc788\ub294 \ub370\uc774\ud130\ub97c \ub2e4\ub8f0 \ub54c \ub9e4\uc6b0 \uc720\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n<h2>1. \ubc18\ubcf5\ubb38\uc758 \uac1c\ub150<\/h2>\n<p>\ubc18\ubcf5\ubb38\uc740 \uc9c0\uc815\ub41c \uc870\uac74\uc774 \ucc38\uc778 \ub3d9\uc548 \ud2b9\uc815 \ucf54\ub4dc\ub97c \ubc18\ubcf5 \uc2e4\ud589\ud558\ub294 \uad6c\uc870\uc785\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc778 \ubc18\ubcf5\ubb38\uc5d0\ub294 <code>for<\/code>, <code>while<\/code>, \uadf8\ub9ac\uace0 <code>foreach<\/code>\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uc911 <code>foreach<\/code> \ubb38\uc740 \uceec\ub809\uc158\uc758 \uac01 \uc694\uc18c\uc5d0 \uc9c1\uc811 \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc8fc\uc5b4, \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uc744 \ub192\uc774\uace0 \uc624\ub958\ub97c \uc904\uc774\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub429\ub2c8\ub2e4.<\/p>\n<h2>2. foreach \ubb38 \uae30\ubcf8 \uad6c\uc870<\/h2>\n<p><code>foreach<\/code> \ubb38\uc740 \ub2e4\uc74c\uacfc \uac19\uc740 \uae30\ubcf8 \uad6c\uc870\ub97c \uac00\uc9c0\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>foreach (\uc790\ub8cc\ud615 \ubcc0\uc218\uba85 in \uceec\ub809\uc158) {\n        \/\/ \ubc18\ubcf5 \uc2e4\ud589\ud560 \ucf54\ub4dc\n    }<\/code><\/pre>\n<h3>2.1 \uc608\uc81c: \ubc30\uc5f4 \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>\uac04\ub2e8\ud55c \uc608\uc81c\ub85c, <code>foreach<\/code> \ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec \ubc30\uc5f4\uc758 \ubaa8\ub4e0 \uc694\uc18c\ub97c \ucd9c\ub825\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>using UnityEngine;\n\npublic class ForEachExample : MonoBehaviour\n{\n    void Start()\n    {\n        int[] numbers = { 1, 2, 3, 4, 5 };\n\n        foreach (int number in numbers)\n        {\n            Debug.Log(number);\n        }\n    }\n}<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\uc5d0\uc11c <code>numbers<\/code> \ubc30\uc5f4\uc758 \uc694\uc18c\ub97c \ud558\ub098\uc529 <code>number<\/code>\ub77c\ub294 \ubcc0\uc218\uc5d0 \ud560\ub2f9\ud558\uace0, \uadf8 \uac12\uc744 \ucf58\uc194\uc5d0 \ucd9c\ub825\ud569\ub2c8\ub2e4.<\/p>\n<h2>3. foreach \ubb38\uacfc \uceec\ub809\uc158<\/h2>\n<p><code>foreach<\/code> \ubb38\uc740 \ubc30\uc5f4\ubfd0\ub9cc \uc544\ub2c8\ub77c \ub9ac\uc2a4\ud2b8, \ud574\uc2dc\uc14b, \ub515\uc154\ub108\ub9ac \ub4f1 \ub2e4\uc591\ud55c \uceec\ub809\uc158\uc5d0\uc11c\ub3c4 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac01 \uceec\ub809\uc158 \uc720\ud615\uc5d0 \ub530\ub978 \uc0ac\uc6a9 \uc608\uc81c\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 \ub9ac\uc2a4\ud2b8 \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>\ub9ac\uc2a4\ud2b8\ub294 \ub3d9\uc801\uc778 \ubc30\uc5f4 \uad6c\uc870\ub85c, \uc694\uc18c\ub97c \ucd94\uac00\ud558\uac70\ub098 \uc0ad\uc81c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \ub9ac\uc2a4\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec <code>foreach<\/code> \ubb38\uc744 \uc801\uc6a9\ud558\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>using System.Collections.Generic;\nusing UnityEngine;\n\npublic class ForEachListExample : MonoBehaviour\n{\n    void Start()\n    {\n        List<string> fruits = new List<string> { \"\uc0ac\uacfc\", \"\ubc14\ub098\ub098\", \"\uccb4\ub9ac\", \"\ub450\ub9ac\uc548\" };\n\n        foreach (string fruit in fruits)\n        {\n            Debug.Log(fruit);\n        }\n    }\n}<\/string><\/string><\/code><\/pre>\n<p>\uc704 \uc608\uc81c\uc5d0\uc11c <code>fruits<\/code> \ub9ac\uc2a4\ud2b8\uc758 \uac01 \uc694\uc18c\uac00 <code>fruit<\/code> \ubcc0\uc218\uc5d0 \ub300\uc785\ub418\uc5b4 \ucf58\uc194\uc5d0 \ucd9c\ub825\ub429\ub2c8\ub2e4.<\/p>\n<h3>3.2 \ud574\uc2dc\uc14b \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>\ud574\uc2dc\uc14b\uc740 \uc720\uc77c\ud55c \uac12\uc744 \uc800\uc7a5\ud558\ub294 \uad6c\uc870\ub85c, \uc8fc\ub85c \uc911\ubcf5\uc744 \ud53c\ud558\uace0\uc790 \ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \ud574\uc2dc\uc14b\uc744 \uc0ac\uc6a9\ud55c \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>using System.Collections.Generic;\nusing UnityEngine;\n\npublic class ForEachHashSetExample : MonoBehaviour\n{\n    void Start()\n    {\n        HashSet<int> uniqueNumbers = new HashSet<int> { 1, 2, 3, 4, 5, 1, 2 };\n\n        foreach (int number in uniqueNumbers)\n        {\n            Debug.Log(number);\n        }\n    }\n}<\/int><\/int><\/code><\/pre>\n<p>\uc5ec\uae30\uc11c <code>uniqueNumbers<\/code> \ud574\uc2dc\uc14b\uc5d0 \uc911\ubcf5\ub41c \uc22b\uc790\uac00 \ud3ec\ud568\ub418\uc5b4 \uc788\uc5b4\ub3c4 \ucd9c\ub825\ub418\ub294 \uac12\uc740 \uc720\uc77c\ud569\ub2c8\ub2e4.<\/p>\n<h3>3.3 \ub515\uc154\ub108\ub9ac \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>\ub515\uc154\ub108\ub9ac\ub294 \ud0a4\uc640 \uac12\uc758 \uc30d\uc73c\ub85c \uc774\ub8e8\uc5b4\uc9c4 \uceec\ub809\uc158\uc785\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \ub515\uc154\ub108\ub9ac\ub97c \uc0ac\uc6a9\ud55c \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>using System.Collections.Generic;\nusing UnityEngine;\n\npublic class ForEachDictionaryExample : MonoBehaviour\n{\n    void Start()\n    {\n        Dictionary<string, int=\"\"> ageMap = new Dictionary<string, int=\"\">\n        {\n            { \"\ud64d\uae38\ub3d9\", 25 },\n            { \"\uae40\ucca0\uc218\", 30 },\n            { \"\uc774\uc601\ud76c\", 28 }\n        };\n\n        foreach (KeyValuePair<string, int=\"\"> entry in ageMap)\n        {\n            Debug.Log($\"\uc774\ub984: {entry.Key}, \ub098\uc774: {entry.Value}\");\n        }\n    }\n}<\/string,><\/string,><\/string,><\/code><\/pre>\n<p>\ub515\uc154\ub108\ub9ac\uc758 <code>KeyValuePair<\/code>\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac01 \uc774\ub984\uacfc \ub098\uc774\ub97c \ucd9c\ub825\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>4. foreach \ubb38\uacfc \uc131\ub2a5 \uace0\ub824\uc0ac\ud56d<\/h2>\n<p><code>foreach<\/code> \ubb38\uc740 \ub9e4\uc6b0 \uc720\uc6a9\ud558\uc9c0\ub9cc, \ub54c\ub54c\ub85c \uc131\ub2a5 \uce21\uba74\uc5d0\uc11c \uace0\ub824\ud574\uc57c \ud560 \uc0ac\ud56d\uc774 \uc788\uc2b5\ub2c8\ub2e4. \ud2b9\ud788 \ud070 \uceec\ub809\uc158\uc744 \ubc18\ubcf5\ud560 \uacbd\uc6b0, \uc131\ub2a5\uc774 \uc911\uc694\ud574\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 <code>foreach<\/code> \ubb38 \uc0ac\uc6a9 \uc2dc \uc54c\uc544\ub450\uc5b4\uc57c \ud560 \uc131\ub2a5 \uad00\ub828 \uc0ac\ud56d\uc785\ub2c8\ub2e4.<\/p>\n<h3>4.1 \uba54\ubaa8\ub9ac \ud560\ub2f9<\/h3>\n<p>\uc5b4\ub5a4 \uacbd\uc6b0\uc5d0\ub294 <code>foreach<\/code> \ubb38\uc774 \uceec\ub809\uc158\uc758 \ubcf5\uc0ac\ubcf8\uc744 \uc0dd\uc131\ud558\uc5ec \uba54\ubaa8\ub9ac\ub97c \ucd94\uac00\ub85c \ud560\ub2f9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub294 \uc8fc\ub85c \ubc30\uc5f4\uc774 \uc544\ub2cc \uceec\ub809\uc158\uc5d0\uc11c \ubc1c\uc0dd\ud569\ub2c8\ub2e4. \uc131\ub2a5\uc774 \uc911\uc694\ud55c \uac8c\uc784\uc5d0\uc11c\ub294 \uc9c1\uc811 \uc778\ub371\uc2a4\ub97c \uc0ac\uc6a9\ud558\ub294 <code>for<\/code> \ubb38\uc774 \ub354 \ube60\ub97c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>4.2 \uceec\ub809\uc158 \ud0c0\uc785<\/h3>\n<p>\uba54\ubaa8\ub9ac \ud560\ub2f9 \ubb38\uc81c\ub294 \uc0ac\uc6a9 \uc911\uc778 \uceec\ub809\uc158\uc758 \uc720\ud615\uc5d0 \ub530\ub77c \ub2e4\ub985\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, <code>List<\/code>\ub294 \uba54\ubaa8\ub9ac\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uad00\ub9ac\ud558\uc9c0\ub9cc, <code>LinkedList<\/code>\ub294 \ub178\ub4dc \uac04\uc758 \uc5f0\uacb0 \ub54c\ubb38\uc5d0 \uc0c1\ub300\uc801\uc73c\ub85c \ub290\ub9b4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>5. foreach \ubb38\uc744 \ud1b5\ud55c \uc2e4\uc6a9\uc801\uc778 \uc608\uc81c<\/h2>\n<p><code>foreach<\/code> \ubb38\uc744 \ud65c\uc6a9\ud558\uc5ec \uc880 \ub354 \uc2e4\uc6a9\uc801\uc778 \uc608\uc81c\ub97c \uc0b4\ud3b4\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>5.1 \uc801 \uc544\uc774\ud15c \uc0dd\uc131\ud558\uae30<\/h3>\n<p>\ub2e4\uc74c\uc740 \uc801(Enemy) \uce90\ub9ad\ud130\ub97c \ubc30\uc5f4\ub85c \ub9cc\ub4e4\uace0 <code>foreach<\/code> \ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud574\ub2f9 \uce90\ub9ad\ud130\uc758 \uc0c1\ud0dc\ub97c \ucd9c\ub825\ud558\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>using UnityEngine;\n\npublic class Enemy\n{\n    public string Name;\n    public int Health;\n\n    public Enemy(string name, int health)\n    {\n        Name = name;\n        Health = health;\n    }\n}\n\npublic class EnemyManager : MonoBehaviour\n{\n    void Start()\n    {\n        Enemy[] enemies = {\n            new Enemy(\"\uc2ac\ub77c\uc784\", 100),\n            new Enemy(\"\uace0\ube14\ub9b0\", 150),\n            new Enemy(\"\ub4dc\ub798\uace4\", 300)\n        };\n\n        foreach (Enemy enemy in enemies)\n        {\n            Debug.Log($\"{enemy.Name}\uc758 \uccb4\ub825: {enemy.Health}\");\n        }\n    }\n}<\/code><\/pre>\n<h3>5.2 \ub098\ub9cc\uc758 \uc624\ube0c\uc81d\ud2b8 \ud480\ub9c1 \uc608\uc81c<\/h3>\n<p>\uc624\ube0c\uc81d\ud2b8 \ud480\ub9c1(Object Pooling)\uc740 \uc790\uc8fc \uc0dd\uc131 \ubc0f \uc18c\uba78\ub418\ub294 \uac8c\uc784 \uc624\ube0c\uc81d\ud2b8\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uad00\ub9ac\ud558\uae30 \uc704\ud55c \ud328\ud134\uc785\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \uac04\ub2e8\ud55c \uc624\ube0c\uc81d\ud2b8 \ud480\ub9c1\uc744 \uc704\ud55c \ud074\ub798\uc2a4 \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>using System.Collections.Generic;\nusing UnityEngine;\n\npublic class Bullet\n{\n    public GameObject bulletObject;\n}\n\npublic class ObjectPool : MonoBehaviour\n{\n    private List<bullet> bulletPool;\n\n    void Start()\n    {\n        bulletPool = new List<bullet>();\n        for (int i = 0; i &lt; 10; i++)\n        {\n            Bullet bullet = new Bullet();\n            bullet.bulletObject = CreateBullet();\n            bulletPool.Add(bullet);\n        }\n\n        foreach (Bullet bullet in bulletPool)\n        {\n            Debug.Log(\"Bullet created: \" + bullet.bulletObject.name);\n        }\n    }\n\n    GameObject CreateBullet()\n    {\n        GameObject bullet = new GameObject(\"Bullet\");\n        \/\/ Bullet\uc758 \ucd08\uae30\ud654 \ucf54\ub4dc\n        return bullet;\n    }\n}<\/bullet><\/bullet><\/code><\/pre>\n<h2>6. \uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 \uc720\ub2c8\ud2f0\uc5d0\uc11c\uc758 \ubc18\ubcf5\ubb38, \ud2b9\ud788 <code>foreach<\/code> \ubb38\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. <code>foreach<\/code> \ubb38\uc740 \uc5ec\ub7ec \uceec\ub809\uc158 \ud0c0\uc785\uc744 \uc21c\ud68c\ud558\uba70 \ucf54\ub4dc\ub97c \ub354\uc6b1 \uac04\uacb0\ud558\uace0 \uac00\ub3c5\uc131\uc774 \ub192\uac8c \ub9cc\ub4e4\uc5b4\uc90d\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc131\ub2a5 \uace0\ub824\uc0ac\ud56d \ub610\ud55c \uc78a\uc9c0 \ub9d0\uc544\uc57c \ud558\uba70, \uc801\uc808\ud788 \ub2e4\ub978 \ubc18\ubcf5\ubb38\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uac8c\uc784 \uac1c\ubc1c \uc2dc \ubc18\ubcf5\uc801\uc778 \uc791\uc5c5\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc720\ub2c8\ud2f0\uc758 \ub2e4\uc591\ud55c \uc694\uc18c\ub97c \ud65c\uc6a9\ud558\uc5ec \uba4b\uc9c4 \uac8c\uc784\uc744 \ub9cc\ub4e4\uc5b4 \ubcf4\uc138\uc694! \uac10\uc0ac\ud569\ub2c8\ub2e4.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc548\ub155\ud558\uc138\uc694! \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 \uc720\ub2c8\ud2f0\uc5d0\uc11c \ub9e4\uc6b0 \uc911\uc694\ud55c \ud504\ub85c\uadf8\ub798\ubc0d \uac1c\ub150 \uc911 \ud558\ub098\uc778 \ubc18\ubcf5\ubb38, \ud2b9\ud788 foreach \ubb38\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubc18\ubcf5\ubb38\uc740 \uc77c\uc744 \ubc18\ubcf5\uc801\uc73c\ub85c \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uc5ec \ucf54\ub4dc\uc758 \uc720\uc6a9\uc131\uc744 \ub192\uc774\uace0, \ubc18\ubcf5\uc801\uc778 \uc791\uc5c5\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4. foreach \ubb38\uc740 \uceec\ub809\uc158(\ubc30\uc5f4, \ub9ac\uc2a4\ud2b8 \ub4f1)\uacfc \uac19\uc774 \ubc18\ubcf5\ud560 \uc218 \uc788\ub294 \ub370\uc774\ud130\ub97c \ub2e4\ub8f0 \ub54c \ub9e4\uc6b0 \uc720\uc6a9\ud569\ub2c8\ub2e4. 1. \ubc18\ubcf5\ubb38\uc758 \uac1c\ub150 \ubc18\ubcf5\ubb38\uc740 \uc9c0\uc815\ub41c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/24976\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-24976","post","type-post","status-publish","format-standard","hentry","category-13"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 - foreach - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/24976\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 - foreach - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc548\ub155\ud558\uc138\uc694! \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 \uc720\ub2c8\ud2f0\uc5d0\uc11c \ub9e4\uc6b0 \uc911\uc694\ud55c \ud504\ub85c\uadf8\ub798\ubc0d \uac1c\ub150 \uc911 \ud558\ub098\uc778 \ubc18\ubcf5\ubb38, \ud2b9\ud788 foreach \ubb38\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubc18\ubcf5\ubb38\uc740 \uc77c\uc744 \ubc18\ubcf5\uc801\uc73c\ub85c \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uc5ec \ucf54\ub4dc\uc758 \uc720\uc6a9\uc131\uc744 \ub192\uc774\uace0, \ubc18\ubcf5\uc801\uc778 \uc791\uc5c5\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4. foreach \ubb38\uc740 \uceec\ub809\uc158(\ubc30\uc5f4, \ub9ac\uc2a4\ud2b8 \ub4f1)\uacfc \uac19\uc774 \ubc18\ubcf5\ud560 \uc218 \uc788\ub294 \ub370\uc774\ud130\ub97c \ub2e4\ub8f0 \ub54c \ub9e4\uc6b0 \uc720\uc6a9\ud569\ub2c8\ub2e4. 1. \ubc18\ubcf5\ubb38\uc758 \uac1c\ub150 \ubc18\ubcf5\ubb38\uc740 \uc9c0\uc815\ub41c &hellip; \ub354 \ubcf4\uae30 &quot;\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/24976\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-26T04:25:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T08:03:15+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/24976\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/24976\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach\",\"datePublished\":\"2024-10-26T04:25:13+00:00\",\"dateModified\":\"2024-11-26T08:03:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/24976\/\"},\"wordCount\":9,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"\uc720\ub2c8\ud2f0\uae30\ucd08\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/24976\/\",\"url\":\"https:\/\/atmokpo.com\/w\/24976\/\",\"name\":\"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 - foreach - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-26T04:25:13+00:00\",\"dateModified\":\"2024-11-26T08:03:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/24976\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/24976\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/24976\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 - foreach - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/24976\/","og_locale":"ko_KR","og_type":"article","og_title":"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 - foreach - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc548\ub155\ud558\uc138\uc694! \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 \uc720\ub2c8\ud2f0\uc5d0\uc11c \ub9e4\uc6b0 \uc911\uc694\ud55c \ud504\ub85c\uadf8\ub798\ubc0d \uac1c\ub150 \uc911 \ud558\ub098\uc778 \ubc18\ubcf5\ubb38, \ud2b9\ud788 foreach \ubb38\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubc18\ubcf5\ubb38\uc740 \uc77c\uc744 \ubc18\ubcf5\uc801\uc73c\ub85c \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uc5ec \ucf54\ub4dc\uc758 \uc720\uc6a9\uc131\uc744 \ub192\uc774\uace0, \ubc18\ubcf5\uc801\uc778 \uc791\uc5c5\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4. foreach \ubb38\uc740 \uceec\ub809\uc158(\ubc30\uc5f4, \ub9ac\uc2a4\ud2b8 \ub4f1)\uacfc \uac19\uc774 \ubc18\ubcf5\ud560 \uc218 \uc788\ub294 \ub370\uc774\ud130\ub97c \ub2e4\ub8f0 \ub54c \ub9e4\uc6b0 \uc720\uc6a9\ud569\ub2c8\ub2e4. 1. \ubc18\ubcf5\ubb38\uc758 \uac1c\ub150 \ubc18\ubcf5\ubb38\uc740 \uc9c0\uc815\ub41c &hellip; \ub354 \ubcf4\uae30 \"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach\"","og_url":"https:\/\/atmokpo.com\/w\/24976\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-26T04:25:13+00:00","article_modified_time":"2024-11-26T08:03:15+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/24976\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/24976\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach","datePublished":"2024-10-26T04:25:13+00:00","dateModified":"2024-11-26T08:03:15+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/24976\/"},"wordCount":9,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["\uc720\ub2c8\ud2f0\uae30\ucd08"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/24976\/","url":"https:\/\/atmokpo.com\/w\/24976\/","name":"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 - foreach - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-26T04:25:13+00:00","dateModified":"2024-11-26T08:03:15+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/24976\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/24976\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/24976\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"\uc720\ub2c8\ud2f0 \uae30\ucd08 \uac15\uc88c: \ubc18\ubcf5\ubb38 &#8211; foreach"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/24976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=24976"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/24976\/revisions"}],"predecessor-version":[{"id":24977,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/24976\/revisions\/24977"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=24976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=24976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=24976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}