복붙노트

배열 / 객체에 어떻게 액세스 할 수 있습니까?

PHP

배열 / 객체에 어떻게 액세스 할 수 있습니까?

나는 다음 배열을 가지고 있고 print_r을 할 때 (array_values ​​($ get_user));

Array (
          [0] => 10499478683521864
          [1] => 07/22/1983
          [2] => email@saya.com
          [3] => Alan [4] => male
          [5] => Malmsteen
          [6] => https://www.facebook.com  app_scoped_user_id/1049213468352864/
          [7] => stdClass Object (
                   [id] => 102173722491792
                   [name] => Jakarta, Indonesia
          )
          [8] => id_ID
          [9] => El-nino
          [10] => Alan El-nino Malmsteen
          [11] => 7
          [12] => 2015-05-28T04:09:50+0000
          [13] => 1
        ) 

다음과 같이 배열에 액세스하려고했습니다.

echo $get_user[0];

그러나 이것은 나를 나타냅니다 :

노트 :

나는 페이스 북 SDK 4에서이 배열을 얻었으므로 원래 배열을 알지 못한다.

배열에서 값 email@saya.com을 예제로 액세스 할 수 있습니까?

해결법

  1. ==============================

    1.

    배열이나 객체에 액세스하려면 두 개의 다른 연산자를 사용하는 방법을 배웁니다.

    배열 요소에 액세스하려면 []를 사용해야합니다. 그렇지 않으면 많이 볼 수 없지만 {}을 사용할 수도 있습니다.

    echo $array[0];
    echo $array{0};
    //Both are equivalent and interchangeable
    

    배열을 정의하고 배열 요소에 액세스하는 것은 다른 두 가지 일입니다. 그래서 그들을 섞지 마십시오.

    배열을 정의하려면 array ()를 사용하거나 PHP> = 5.4 []를 사용하고 배열 / 요소를 할당 / 설정하십시오. 위에서 언급 한 바와 같이 [] 또는 {}를 사용하여 배열 요소에 액세스 할 때 요소 설정과 반대되는 배열 요소의 값을 가져옵니다.

    //Declaring an array
    $arrayA = array ( /*Some stuff in here*/ );
    $arrayB = [ /*Some stuff in here*/ ]; //Only for PHP >=5.4
    
    //Accessing an array element
    echo $array[0];
    echo $array{0};
    

    배열의 특정 요소에 액세스하려면 [] 또는 {} 안에있는 표현식을 사용하면 액세스 할 키로 평가됩니다.

    $array[(Any expression)]
    

    따라서 여러분이 키로 사용하는 표현식과 PHP에 의해 해석되는 방식을 알고 있어야합니다.

    echo $array[0];            //The key is an integer; It accesses the 0's element
    echo $array["0"];          //The key is a string; It accesses the 0's element
    echo $array["string"];     //The key is a string; It accesses the element with the key 'string'
    echo $array[CONSTANT];     //The key is a constant and it gets replaced with the corresponding value
    echo $array[cOnStAnT];     //The key is also a constant and not a string
    echo $array[$anyVariable]  //The key is a variable and it gets replaced with the value which is in '$anyVariable'
    echo $array[functionXY()]; //The key will be the return value of the function
    

    서로 여러 배열이있는 경우 다차원 배열이 있습니다. 하위 배열의 배열 요소에 액세스하려면 여러 []를 사용해야합니다.

    echo $array["firstSubArray"]["SecondSubArray"]["ElementFromTheSecondSubArray"]
             // ├─────────────┘  ├──────────────┘  ├────────────────────────────┘
             // │                │                 └── 3rd Array dimension;
             // │                └──────────────────── 2d  Array dimension;
             // └───────────────────────────────────── 1st Array dimension;
    

    개체 속성에 액세스하려면 -> 사용해야합니다.

    echo $object->property;
    

    다른 객체에 객체가있는 경우 객체 속성에 도달하려면 여러 개의 ->를 사용해야합니다.

    echo $objectA->objectB->property;
    

    이제 배열과 객체가 서로 섞여 있으면 배열 요소 나 객체 속성에 액세스하고 해당 연산자를 사용하는지 살펴 봐야합니다.

    //Object
    echo $object->anotherObject->propertyArray["elementOneWithAnObject"]->property;
        //├────┘  ├───────────┘  ├───────────┘ ├──────────────────────┘   ├──────┘
        //│       │              │             │                          └── property ; 
        //│       │              │             └───────────────────────────── array element (object) ; Use -> To access the property 'property'
        //│       │              └─────────────────────────────────────────── array (property) ; Use [] To access the array element 'elementOneWithAnObject'
        //│       └────────────────────────────────────────────────────────── property (object) ; Use -> To access the property 'propertyArray'
        //└────────────────────────────────────────────────────────────────── object ; Use -> To access the property 'anotherObject'
    
    
    //Array
    echo $array["arrayElement"]["anotherElement"]->object->property["element"];
        //├───┘ ├────────────┘  ├──────────────┘   ├────┘  ├──────┘ ├───────┘
        //│     │               │                  │       │        └── array element ; 
        //│     │               │                  │       └─────────── property (array) ; Use [] To access the array element 'element'
        //│     │               │                  └─────────────────── property (object) ; Use -> To access the property 'property'
        //│     │               └────────────────────────────────────── array element (object) ; Use -> To access the property 'object'
        //│     └────────────────────────────────────────────────────── array element (array) ; Use [] To access the array element 'anotherElement'
        //└──────────────────────────────────────────────────────────── array ; Use [] To access the array element 'arrayElement'
    
    

    서로간에 중첩되어있을 때 배열과 객체에 어떻게 접근 할 수 있는지 대략적인 아이디어를 줄 수 있기를 바랍니다.

    단일 요소에 액세스하고 싶지 않으면 중첩 배열 / 객체를 반복하고 특정 차원의 값을 살펴볼 수 있습니다.

    이를 위해서는 반복하려는 차원 이상에 액세스해야하며 해당 차원의 모든 값을 반복 할 수 있습니다.

    예를 들어 배열을 취할 수도 있지만 객체 일 수도 있습니다.

    Array (
        [data] => Array (
                [0] => stdClass Object (
                        [propertyXY] => 1
                    )    
                [1] => stdClass Object (
                        [propertyXY] => 2
                    )   
                [2] => stdClass Object (
                        [propertyXY] => 3                   
                   )    
            )
    )
    

    첫 번째 특성 항목을 반복하면 첫 번째 특성 항목에서 모든 값을 가져옵니다.

    foreach($array as $key => $value)
    

    여기서 첫 번째 차원의 의미는 키 ($ key) 데이터와 값 ($ value)이있는 요소가 하나 뿐인 것입니다.

    Array (  //Key: array
        [0] => stdClass Object (
                [propertyXY] => 1
            )
        [1] => stdClass Object (
                [propertyXY] => 2
            )
        [2] => stdClass Object (
                [propertyXY] => 3
            )
    )
    

    두 번째 차원을 반복하면 두 번째 차원에서 모든 값을 가져옵니다.

    foreach($array["data"] as $key => $value)
    

    두 번째 차원의 의미는 키 ($ key) 0, 1, 2 및 값 ($ value)이있는 3 요소입니다.

    stdClass Object (  //Key: 0
        [propertyXY] => 1
    )
    stdClass Object (  //Key: 1
        [propertyXY] => 2
    )
    stdClass Object (  //Key: 2
        [propertyXY] => 3
    )
    

    그리고 이것으로 배열이나 객체인지 상관없이 원하는 모든 차원을 반복 할 수 있습니다.

    이 3 가지 디버그 기능은 모두 동일한 데이터를 다른 형식으로 또는 일부 메타 데이터 (예 : 유형, 크기)와 함께 출력합니다. 여기서는 배열 / 객체에서 특정 데이터에 액세스하는 방법을 알기 위해 이러한 함수의 출력을 읽어야하는 방법을 보여 드리려고합니다.

    입력 배열 :

    $array = [
        "key" => (object) [
            "property" => [1,2,3]
        ]
    ];
    

    var_dump () 출력 :

    array(1) {
      ["key"]=>
      object(stdClass)#1 (1) {
        ["property"]=>
        array(3) {
          [0]=>
          int(1)
          [1]=>
          int(2)
          [2]=>
          int(3)
        }
      }
    }
    

    print_r () 출력 :

    Array
    (
        [key] => stdClass Object
            (
                [property] => Array
                    (
                        [0] => 1
                        [1] => 2
                        [2] => 3
                    )
    
            )
    
    )
    

    var_export () 출력 :

    array (
      'key' => 
      stdClass::__set_state(array(
         'property' => 
        array (
          0 => 1,
          1 => 2,
          2 => 3,
        ),
      )),
    )
    

    따라서 모든 출력이 매우 유사하다는 것을 알 수 있습니다. 그리고 만약 당신이 지금 가치 2에 접근하기를 원한다면 당신은 접근하고자하는 가치 그 자체에서 시작해서 "왼쪽 상단"으로 나아갈 수 있습니다.

    1. 먼저 값 2는 키 1을 가진 배열에 있음을 알 수 있습니다.

    array(3) {  //var_dump()
      [0]=>
      int(1)
      [1]=>
      int(2)
      [2]=>
      int(3)
    }
    

    배열 // print_r () (   [0] => 1   [1] => 2   [2] => 3 ) array (// var_export ()   0 => 1,   1 => 2,   2 => 3, ), 이것은 값이 키 / 인덱스 1을 가지므로 [1]로 값 2에 액세스하려면 [] / {}을 사용해야 함을 의미합니다. 2. 다음으로 우리는 배열이 객체의 name 속성을 가진 속성에 할당된다는 것을 봅니다. object (stdClass) # 1 (1) {// var_dump ()   [ "property"] =>     / * 여기에 배열 * / } stdClass 객체 // print_r () (   [property] => / * 여기에 배열 * / ) stdClass :: __ set_state (array (// var_export ()   '속성'=>     / * 여기에 배열 * / )), 즉, 객체의 속성에 액세스하려면 ->를 사용해야합니다. -> 속성. 그래서 지금까지는 우리가 -> 속성 [1]을 사용해야 만한다는 것을 알았습니다. 3. 그리고 마지막에 우리는 가장 바깥 쪽이 배열임을 알 수 있습니다. array (1) {// var_dump ()   [ "key"] =>     / * 여기에 객체와 배열 * / } 배열 // print_r () (   [key] =>     / * 여기에 객체와 배열 * / ) array (// var_export ()   '키'=>     / * 여기에 객체와 배열 * / ) []를 사용하여 배열 요소에 액세스해야한다는 것을 알았으므로 [ "key"]를 사용하여 객체에 액세스해야합니다. 이제 우리는이 모든 부분을 모아서 다음과 같이 쓸 수 있습니다. echo $ array [ "key"] -> property [1]; 출력은 다음과 같습니다. 2 PHP가 당신을 트롤하게하지 마라! 당신이 알아야 할 몇 가지가 있습니다, 그래서 당신은 그것을 찾는 데 몇 시간을 소비하지 않습니다. "숨겨진"문자 때로는 키에 문자가있어 브라우저에서 처음 보지 못하는 문자가 있습니다. 그리고 나서 여러분은 스스로에게 묻습니다, 왜 여러분은 그 요소에 접근 할 수 없습니다. 탭 (\ t), 줄 바꿈 (\ n), 공백 또는 HTML 태그 (예 : , ) 등이 될 수 있습니다. 예를 들어 print_r ()의 결과를 살펴보면 다음과 같습니다. 배열 ([key] => 여기) 그러면 다음을 사용하여 요소에 액세스하려고합니다. echo $ arr [ "key"]; 그러나 당신은 통지를 받고 있습니다 : 주의 : 정의되지 않은 인덱스 : 키 키가 꽤 정확한 것처럼 보이더라도 요소에 액세스 할 수 없으므로 숨겨진 문자가 있어야 함을 나타내는 좋은 표시입니다. 여기의 트릭은 var_dump () + 소스 코드를 살펴 보는 것입니다! (대안 : highlight_string (print_r ($ variable, TRUE));) 갑자기 다음과 같은 것들을 보게 될 것입니다. 배열 (1) {   [ " key "] =>   문자열 (4) "여기" } 이제 print_r ()과 브라우저에서 보여준 것이 아니기 때문에, 키에 html 태그와 개행 문자가 있다는 것을 알 수 있습니다. 그래서 지금하려고하면 : echo $ arr [ " \ nkey"]; 원하는 출력을 얻을 수 있습니다. 이리 XML을 보면 print_r () 또는 var_dump ()의 출력을 신뢰하지 마십시오. XML 파일이나 문자열을 객체에로드 할 수 있습니다 (예 :               테스트 </ title>     </ item> </ rss> 이제 var_dump () 또는 print_r ()을 사용하면 다음을 볼 수 있습니다 : SimpleXMLElement 객체 (     [item] => SimpleXMLElement 객체     (         [title] => 테스트     ) ) 그래서 당신이 볼 수 있듯이, 당신은 제목의 속성을 보지 못합니다. 따라서 XML 객체가있을 때 var_dump () 또는 print_r ()의 출력을 절대 신뢰하지 않는다고 말했습니다. 전체 XML 파일 / 문자열을 보려면 항상 asXML ()을 사용하십시오. 따라서 아래 표시된 방법 중 하나를 사용하십시오. echo $ xml-> asXML (); // 그리고 소스 코드를 살펴 본다. highlight_string ($ xml-> asXML ()); header ( "Content-Type : text / xml"); echo $ xml-> asXML (); 그리고 출력을 얻을 것입니다 : <? xml version = "1.0"encoding = "UTF-8"?> <rss>     <item>         <title attribute = "xy"ab = "xy"> 테스트 </ title>     </ item> </ rss> 자세한 내용은 다음을 참조하십시오. 일반 (기호, 오류) 참고 -이 기호는 PHP에서 무엇을 의미합니까? 참고 -이 오류는 PHP에서 무엇을 의미합니까? PHP 구문 분석 / 구문 오류; 어떻게 해결할 수 있을까요? 부동산 이름 문제 잘못된 이름의 부동산에 어떻게 액세스합니까? 정수와 같은 이름을 가진 객체 속성에 액세스하는 방법?</p> </li> <li> <div>==============================</div><h2>2.</h2> <p>질문에서 우리는 입력 배열의 구조를 볼 수 없습니다. 배열 ( 'id'=> 10499478683521864, 'date'=> '07 / 22 / 1983 ') 일 수 있습니다. 그래서 당신이 $ demo [0]을 요구할 때 당신은 undefind index를 사용합니다.</p> <p>Array_values ​​배열을 배열로 만드는 수많은 키가있는 키와 반환 배열을 잃어 버렸습니다 (10499478683521864, '07 / 22 / 1983 '...). 이 결과는 우리가 질문에서 볼 수 있습니다.</p> <p>따라서 동일한 방법으로 배열 항목 값을 가져올 수 있습니다.</p> <pre><code>echo array_values($get_user)[0]; // 10499478683521864 </code></pre> </li> <li> <div>==============================</div><h2>3.</h2> <p>print_r ($ var)의 출력이 다음과 같은 경우 :</p> <pre><code> Array ( [demo] => Array ( [0] => 10499478683521864 [1] => 07/22/1983 [2] => email@saya.com ) ) </code></pre> <p>그런 다음 $ var [ 'demo'] [0]</p> <p>print_r ($ var)의 출력이 다음과 같은 경우 :</p> <pre><code> Array ( [0] => 10499478683521864 [1] => 07/22/1983 [2] => email@saya.com ) </code></pre> <p>그런 다음 $ var [0]</p> </li> <li> <div>==============================</div><h2>4.</h2> <p>당신이 사용할 수있는</p> <pre><code>$ar = (array) $get_user; </code></pre> <p>arra-wise로 자신의 인덱스에 액세스 할 수 있습니다.</p> <pre><code>echo $ar[0]; </code></pre> </li> </ul> <p>from <a href='https://stackoverflow.com/questions/30680938/how-can-i-access-an-array-object' target='_blank' />https://stackoverflow.com/questions/30680938/how-can-i-access-an-array-object</a> by cc-by-sa and MIT lisence</p> </div> <!-- System - START --> <!-- System - END --> <!-- Adfit_PC - START --> <!-- Adfit_PC - END --> <!-- GoogleAdsenseForResponsive - START --> <div class="tt_adsense_bottom" style="margin-top:30px;"> <DIV class='ads_adsense_img' style='margin:40px 0px 40px 0px;'> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 디스플레이광고만 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-8393857339019314" data-ad-slot="7474886381" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </DIV> </div> <!-- GoogleAdsenseForResponsive - END --> <div class="container_postbtn #post_button_group"> <div class="postbtn_like"><script>window.ReactionButtonType = 'reaction'; window.ReactionApiUrl = '//cnpnote.tistory.com/reaction'; window.ReactionReqBody = { entryId: 87 }</script> <div class="wrap_btn" id="reaction-87"></div> <script src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-fda325030f650f8bb6efdfbc900c54d5af6cf662/static/script/reaction-button-container.min.js"></script><div class="wrap_btn wrap_btn_share"><button type="button" class="btn_post sns_btn btn_share" aria-expanded="false" data-thumbnail-url="https://t1.daumcdn.net/tistory_admin/static/images/openGraph/opengraph.png" data-title="배열 / 객체에 어떻게 액세스 할 수 있습니까?" data-description="배열 / 객체에 어떻게 액세스 할 수 있습니까? 나는 다음 배열을 가지고 있고 print_r을 할 때 (array_values ​​($ get_user)); Array ( [0] => 10499478683521864 [1] => 07/22/1983 [2] => email@saya.com [3] => Alan [4] => male [5] => Malmsteen [6] => https://www.facebook.com app_scoped_user_id/1049213468352864/ [7] => stdClass Object ( [id] => 102173722491792 [name] => Jakarta, Indonesia ) [8] => id_ID [9] => El-nino [10] => Alan El-nin.." data-profile-image="https://t1.daumcdn.net/tistory_admin/static/manage/images/r3/default_L.png" data-profile-name="cnpnote" data-pc-url="https://cnpnote.tistory.com/entry/%EB%B0%B0%EC%97%B4-%EA%B0%9D%EC%B2%B4%EC%97%90-%EC%96%B4%EB%96%BB%EA%B2%8C-%EC%95%A1%EC%84%B8%EC%8A%A4-%ED%95%A0-%EC%88%98-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C" data-relative-pc-url="/entry/%EB%B0%B0%EC%97%B4-%EA%B0%9D%EC%B2%B4%EC%97%90-%EC%96%B4%EB%96%BB%EA%B2%8C-%EC%95%A1%EC%84%B8%EC%8A%A4-%ED%95%A0-%EC%88%98-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C" data-blog-title="복붙노트"><span class="ico_postbtn ico_share">공유하기</span></button> <div class="layer_post" id="tistorySnsLayer"></div> </div><div class="wrap_btn wrap_btn_etc" data-entry-id="87" data-entry-visibility="public" data-category-visibility="public"><button type="button" class="btn_post btn_etc2" aria-expanded="false"><span class="ico_postbtn ico_etc">게시글 관리</span></button> <div class="layer_post" id="tistoryEtcLayer"></div> </div></div> <button type="button" class="btn_menu_toolbar btn_subscription #subscribe" data-blog-id="2840920" data-url="https://cnpnote.tistory.com/entry/%EB%B0%B0%EC%97%B4-%EA%B0%9D%EC%B2%B4%EC%97%90-%EC%96%B4%EB%96%BB%EA%B2%8C-%EC%95%A1%EC%84%B8%EC%8A%A4-%ED%95%A0-%EC%88%98-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C" data-device="web_pc"><em class="txt_state">구독하기</em><strong class="txt_tool_id">복붙노트</strong><span class="img_common_tistory ico_check_type1"></span></button> <div data-tistory-react-app="SupportButton"></div> </div> <!-- PostListinCategory - START --> <div class="another_category another_category_color_gray"> <h4>'<a href="/category/PHP">PHP</a>' 카테고리의 다른 글</h4> <table> <tr> <th><a href="/entry/%EB%82%B4-PDO-%EC%A7%84%EC%88%A0%EC%84%9C%EA%B0%80-%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80-%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4">내 PDO 진술서가 작동하지 않습니다.</a>  <span>(0)</span></th> <td>2018.09.01</td> </tr> <tr> <th><a href="/entry/PHP-PDO-%EB%AC%B8%EC%9D%B4-%ED%85%8C%EC%9D%B4%EB%B8%94-%EB%98%90%EB%8A%94-%EC%97%B4-%EC%9D%B4%EB%A6%84%EC%9D%84-%EB%A7%A4%EA%B0%9C-%EB%B3%80%EC%88%98%EB%A1%9C-%ED%97%88%EC%9A%A9-%ED%95%A0-%EC%88%98-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C">PHP PDO 문이 테이블 또는 열 이름을 매개 변수로 허용 할 수 있습니까?</a>  <span>(0)</span></th> <td>2018.09.01</td> </tr> <tr> <th><a href="/entry/PHP%EC%97%90%EC%84%9C-%EB%A6%AC%EB%94%94%EB%A0%89%EC%85%98%EC%9D%84-%EB%A7%8C%EB%93%9C%EB%8A%94-%EB%B0%A9%EB%B2%95%EC%9D%80-%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C">PHP에서 리디렉션을 만드는 방법은 무엇입니까?</a>  <span>(0)</span></th> <td>2018.09.01</td> </tr> <tr> <th><a href="/entry/PHP%EB%A1%9C-jQuery-Ajax-POST-%EC%98%88%EC%A0%9C">PHP로 jQuery Ajax POST 예제</a>  <span>(0)</span></th> <td>2018.09.01</td> </tr> <tr> <th><a href="/entry/PHP%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC-%EB%91%90-%EB%82%A0%EC%A7%9C%EC%9D%98-%EC%B0%A8%EC%9D%B4%EB%A5%BC-%EA%B3%84%EC%82%B0%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95%EC%9D%80-%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C">PHP를 사용하여 두 날짜의 차이를 계산하는 방법은 무엇입니까?</a>  <span>(0)</span></th> <td>2018.09.01</td> </tr> </table> </div> <!-- PostListinCategory - END --> </div> <div class="entry-footer"> <div class="actionTrail"> <a href="#tb" onclick=""></a>, <a href="#rp" onclick=""></a> </div> <div data-tistory-react-app="Namecard"></div> </div> </div> </div><!-- entry close --> </article> </div><!-- container close --> <aside role="complementary" id="sidebar"> <div class="container"> <div class="sidebar-inner"> <div class="module module_plugin"> <!-- Adfit_PC - START --> <ins class="kakao_ad_area" style="display:none;" data-ad-unit = "DAN-ubre63wuo3sm" data-ad-width = "160" data-ad-height = "600"></ins> <script type="text/javascript" src="//t1.daumcdn.net/kas/static/ba.min.js" async></script> <!-- Adfit_PC - END --> </div> <!-- 검색 모듈 --> <div class="widget widget-search col-md-3 col-xs-12"> <h3><i class="icon-magnifier icons"></i> Search</h3> <input type="text" name="search" value="" onkeypress="if (event.keyCode == 13) { try { window.location.href = '/search' + '/' + looseURIEncode(document.getElementsByName('search')[0].value); document.getElementsByName('search')[0].value = ''; return false; } catch (e) {} }"/> <input value="검색" type="button" onclick="try { window.location.href = '/search' + '/' + looseURIEncode(document.getElementsByName('search')[0].value); document.getElementsByName('search')[0].value = ''; return false; } catch (e) {}" class="btn btn-default btn-sm"/> </div> <!-- 카테고리 모듈 --> <div class="widget widget-category col-md-3 col-xs-12"> <h3><i class="icon-direction icons"></i> 카테고리</h3> <ul class="tt_category"><li class=""><a href="/category" class="link_tit"> 분류 전체보기 </a> <ul class="category_list"><li class=""><a href="/category/PHP" class="link_item"> PHP </a></li> <li class=""><a href="/category/%EC%8A%A4%ED%81%AC%EB%9E%98%EC%B9%98%203.0" class="link_item"> 스크래치 3.0 </a></li> <li class=""><a href="/category/PYTHON" class="link_item"> PYTHON </a></li> <li class=""><a href="/category/SPRING" class="link_item"> SPRING </a></li> <li class=""><a href="/category/HADOOP" class="link_item"> HADOOP </a></li> <li class=""><a href="/category/SCALA" class="link_item"> SCALA </a></li> <li class=""><a href="/category/MONGODB" class="link_item"> MONGODB </a></li> <li class=""><a href="/category/REDIS" class="link_item"> REDIS </a></li> <li class=""><a href="/category/RUBY-ON-RAILS" class="link_item"> RUBY-ON-RAILS </a></li> <li class=""><a href="/category/SQL" class="link_item"> SQL </a></li> <li class=""><a href="/category/NODEJS" class="link_item"> NODEJS </a></li> <li class=""><a href="/category/JQUERY" class="link_item"> JQUERY </a></li> <li class=""><a href="/category/ANDROID" class="link_item"> ANDROID </a></li> <li class=""><a href="/category/SWIFT" class="link_item"> SWIFT </a></li> <li class=""><a href="/category/HTML" class="link_item"> HTML </a></li> <li class=""><a href="/category/CSS" class="link_item"> CSS </a></li> <li class=""><a href="/category/REACTJS" class="link_item"> REACTJS </a></li> <li class=""><a href="/category/VUEJS" class="link_item"> VUEJS </a></li> <li class=""><a href="/category/WORDPRESS" class="link_item"> WORDPRESS </a></li> <li class=""><a href="/category/ANGULAR" class="link_item"> ANGULAR </a></li> <li class=""><a href="/category/MICROSERVICE" class="link_item"> MICROSERVICE </a></li> <li class=""><a href="/category/DJANGO" class="link_item"> DJANGO </a></li> <li class=""><a href="/category/FLASK" class="link_item"> FLASK </a></li> <li class=""><a href="/category/APACHE" class="link_item"> APACHE </a></li> <li class=""><a href="/category/GO" class="link_item"> GO </a></li> <li class=""><a href="/category/JAVA" class="link_item"> JAVA </a></li> <li class=""><a href="/category/FLUTTER" class="link_item"> FLUTTER </a></li> <li class=""><a href="/category/REACTIVE" class="link_item"> REACTIVE </a></li> <li class=""><a href="/category/SPA" class="link_item"> SPA </a></li> </ul> </li> </ul> </div> <!-- 태그목록 모듈 --> <div class="widget widget-tag col-md-3 col-xs-12"> <h3><i class="icon-tag icons"></i> 태그목록</h3> <ul> <li><a href="/tag/HADOOP" class="cloud3"> HADOOP</a></li> <li><a href="/tag/spring-mvc" class="cloud4"> spring-mvc</a></li> <li><a href="/tag/java" class="cloud2"> java</a></li> <li><a href="/tag/spring" class="cloud1"> spring</a></li> <li><a href="/tag/jQuery" class="cloud4"> jQuery</a></li> <li><a href="/tag/mysql" class="cloud4"> mysql</a></li> <li><a href="/tag/javascript" class="cloud4"> javascript</a></li> <li><a href="/tag/PYTHON" class="cloud3"> PYTHON</a></li> <li><a href="/tag/sql" class="cloud2"> sql</a></li> <li><a href="/tag/php" class="cloud4"> php</a></li> </ul> </div> <!-- 최근 포스트 모듈 --> <div class="widget widget-post col-md-3 col-xs-12"> <h3><i class="icon-list icons"></i> 최근에 올라온 글 </h3> <ul> </ul> </div> </div> </div> </div><!-- container close --> </aside><!-- sidebar close --> <footer role="contentinfo"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 footer-menu"> <a href="https://cnpnote.tistory.com/tag"><i class="icon-tag icons"></i> </a> <a href="https://cnpnote.tistory.com/rss" onclick="window.open(this.href); return false"><i class="icon-feed icons"></i> </a> </div> <div class="col-xs-12 col-sm-12 col-md-12 footer-copyright text-right"> <a href="https://cnpnote.tistory.com/"> cnpnote</a>'s Blog is powered by <a href="http://daum.net" onclick="window.open(this.href); return false">Daumkakao</a> / Designed by <a href="http://ongal.tistory.com">CEOSEO</a> </div> </div> </div> </footer> <!-- jQuery --> <script src="https://tistory1.daumcdn.net/tistory/2840920/skin/images/jquery-1.11.0.min.js?_version_=1583344392"></script> <div class="#menubar menu_toolbar "> <h2 class="screen_out">티스토리툴바</h2> <div class="btn_tool"><button class="btn_menu_toolbar btn_subscription #subscribe" data-blog-id="2840920" data-url="https://cnpnote.tistory.com" data-device="web_pc"><strong class="txt_tool_id">복붙노트</strong><em class="txt_state">구독하기</em><span class="img_common_tistory ico_check_type1"></span></button></div></div> <div class="#menubar menu_toolbar "></div> <div class="layer_tooltip"> <div class="inner_layer_tooltip"> <p class="desc_g"></p> </div> </div> <iframe id="editEntry" style="position:absolute;width:1px;height:1px;left:-100px;top:-100px" src="//cnpnote.tistory.com/api"></iframe> <!-- DragSearchHandler - START --> <script src="//search1.daumcdn.net/search/statics/common/js/g/search_dragselection.min.js"></script> <!-- DragSearchHandler - END --> <script type="text/javascript">(function($) { $(document).ready(function() { lightbox.options.fadeDuration = 200; lightbox.options.resizeDuration = 200; lightbox.options.wrapAround = false; lightbox.options.albumLabel = "%1 / %2"; }) })(tjQuery);</script> <div style="margin:0; padding:0; border:none; background:none; float:none; clear:none; z-index:0"></div> <script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-fda325030f650f8bb6efdfbc900c54d5af6cf662/static/script/common.js"></script> <script type="text/javascript">window.roosevelt_params_queue = window.roosevelt_params_queue || [{channel_id: 'dk', channel_label: '{tistory}'}]</script> <script type="text/javascript" src="//t1.daumcdn.net/midas/rt/dk_bt/roosevelt_dk_bt.js" async="async"></script> <script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-fda325030f650f8bb6efdfbc900c54d5af6cf662/static/script/menubar.min.js"></script> <script>window.tiara = {"svcDomain":"user.tistory.com","section":"글뷰","trackPage":"글뷰_보기","page":"글뷰","key":"2840920-87","customProps":{"userId":"0","blogId":"2840920","entryId":"87","role":"guest","trackPage":"글뷰_보기","filterTarget":false},"entry":{"entryId":"87","categoryName":"PHP","categoryId":"264984","author":"3264508","image":"","plink":"/entry/%EB%B0%B0%EC%97%B4-%EA%B0%9D%EC%B2%B4%EC%97%90-%EC%96%B4%EB%96%BB%EA%B2%8C-%EC%95%A1%EC%84%B8%EC%8A%A4-%ED%95%A0-%EC%88%98-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C","tags":["arrays","class","object","php","properties"]},"kakaoAppKey":"3e6ddd834b023f24221217e370daed18","appUserId":"null"}</script> <script type="module" src="https://t1.daumcdn.net/tistory_admin/frontend/tiara/v1.0.0/index.js"></script> <script src="https://t1.daumcdn.net/tistory_admin/frontend/tiara/v1.0.0/polyfills-legacy.min.js" nomodule="true" defer="true"></script> <script src="https://t1.daumcdn.net/tistory_admin/frontend/tiara/v1.0.0/index-legacy.js" nomodule="true" defer="true"></script> </body> </html>