update : 2015.11.03
php.shukuma.com검색:
|
mysqli_result::fetch_assocmysqli_fetch_assoc(PHP 5) mysqli_result::fetch_assoc -- mysqli_fetch_assoc — Fetch a result row as an associative array 설명객체 기반 형식
array mysqli_result::fetch_assoc
( void
)
절차식 형식
Returns an associative array that corresponds to the fetched row or
반환값
Returns an associative array of strings representing the fetched row in the result
set, where each key in the array represents the name of one of the result
set's columns or If two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the same name, you either need to access the result with numeric indices by using mysqli_fetch_row() or add alias names. 예제Example #1 객체 기반 형식
<?php Example #2 절차식 형식
<?php 위 예제들의 출력: Pueblo (USA) Arvada (USA) Cape Coral (USA) Green Bay (USA) Santa Clara (USA) Example #3 A mysqli_result example comparing iterator usage
<?php 위 예제의 출력 예시: 'root'@'192.168.1.1' 'root'@'127.0.0.1' 'dude'@'localhost' 'lebowski'@'localhost' ================== 'root'@'192.168.1.1' 'root'@'127.0.0.1' 'dude'@'localhost' 'lebowski'@'localhost' 참고
|