Hướng dẫn pos() trong php
Hướng dẫn cách sử dụng hàm pos() về mảng trong lập trình PHP Show Tác dụng của hàm pos()The The following table summarizes the technical details of this function.
Tip: Every array has an internal pointer that points to the current element in the array, when a new array is created, the current pointer is initialized reference the first element in the array. The SyntaxThe basic syntax of the The following example shows the
ParametersThe
More ExamplesHere're some more examples showing how The following example demonstrates how to get the current value from an associative array:
The
Here's an example that demonstrates how these functions basically work:
Bài viết này đã giúp ích cho bạn?Bài viết mớiHàm Bài viết này được đăng tại freetuts.net, không được copy dưới mọi hình thức. Cú phápCú pháp: Trong đó:
Ví dụCode $arr = array( 'vi tri 1', 'vi tri 2' , 'vi tri 3', 'vi tri 4' ); echo pos($arr).' Kết quả vi tri 1 vi tri 2 Mặc định ban đầu, con trỏ sẽ ở vị trí phần tử đầu tiên của mảng(vi tri 1), sau khi sử dụng hàm next() con trỏ nội bộ sẽ ở vị trí thứ 2(vi tri 2). Bài viết này được đăng tại [free tuts .net] Tham khảo: php.net Cùng chuyên mục:
Hướng dẫn cách sử dụng hàm pos() về mảng trong lập trình PHP Tác dụng của hàm pos()The The following table summarizes the technical details of this function.
Tip: Every array has an internal pointer that points to the current element in the array, when a new array is created, the current pointer is initialized reference the first element in the array. The SyntaxThe basic syntax of the The following example shows the
ParametersThe
More ExamplesHere're some more examples showing how The following example demonstrates how to get the current value from an associative array:
The
Here's an example that demonstrates how these functions basically work:
Bài viết này đã giúp ích cho bạn?Bài viết mới |