0

hy guys,..how to make paging from array 3D?
first index[0] become first page next index[1]become second page and next index[2] become third page
example:

Array
(
[0] => Array     page>>>1 
(
    [0] => Array
    (
        [0] => aaa
        [1] => bbb 
    )

    [1] => Array
    (
        [0] => sss
        [1] => aaa
        [2] => bbb 
    )

)

[1] => Array      page>>>2
(
      [0] => Array
       (
        [63] => oof
        [64] => ppp 
        )

      [1] => Array
        (
        [203] => ttt
        [204] => fff 
        )
  )

[2] => Array     page>>>3
(
      [0] => Array
        (
        [200] => qqq
        [201] => wwwi
        )

      [1] => Array
        (
        [241] => ee
        [242] => ddd 
        )

)
2
Contributors
1
Reply
4
Views
5 Years
Discussion Span
Last Post by Robert1995
0

Your explanation skills are horrible, but, you can try this,

we will consider that $information, if the array you've specified

<?php 
// We consider by default the current page as 1
$current_page = (isset($_GET['page']) ? (int)$_GET['page'] : 1);
// As we are using an unsorted array, and we want to make sure we pick the right container, we will decrecease it by 1, so we can get the stored array element in 0
$current_page -= 1;

$information = array();// You know what
$used_information = array();// these are the entries which we will explain

$used_information = array_slice($information, $current_page, 1);

// Used Information : 
var_dump($used_information);

?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.