Lección 16: Paginador

Tomamos de partida los 10 primeros personajes, ordenados alfabéticamente, de juegos de tronos como “base de datos”.

$personajes = [
  0 => [
     'name' => 'Abelar Hightower',
     'books' => [
        0 => 'The Hedge Knight'
    ]
  ],
  1 => [
     'name' => 'Addam Frey',
     'books' => [
      0 => 'The Mystery Knight'
    ]
  ],
  2 => [
     'name' => 'Addam',
     'books' => [
      0 => 'The Mystery Knight'
    ]
  ],
  3 => [
     'name' => 'Addam Osgrey',
     'books' => [
        0 => 'The Sworn Sword'
    ]
  ],
  4 => [
     'name' => 'Addam Marbrand',
     'books' => [
      0 => 'A Game of Thrones',
      1 => 'A Clash of Kings',
      2 => 'A Storm of Swords',
      3 => 'A Feast for Crows',
      4 => 'A Dance with Dragons'
    ]
  ],
  5 => [
     'name' => 'Addison Hill',
     'books' => [
      0 => 'The World of Ice and Fire',
      1 => 'A Feast for Crows'
    ]
  ],
  6 => [
     'name' => 'Aegon Blackfyre',
     'books' => [
      0 => 'The Sworn Sword',
      1 => 'The Mystery Knight',
      2 => 'A Storm of Swords'
    ]
  ],
  7 => [
     'name' => 'Addam Velaryon',
     'books' => [
      0 => 'The World of Ice and Fire',
      1 => 'The Princess and the Queen'
    ]
  ],
  8 => [
     'name' => 'Aegon Frey (son of Aenys)',
     'books' => [
      0 => 'A Clash of Kings',
      1 => 'A Storm of Swords',
      2 => 'A Feast for Crows',
      3 => 'A Dance with Dragons'
    ]
  ],
  9 => [
     'name' => 'Aegon Frey (son of Stevron)',
     'books' => [
      0 => 'A Clash of Kings',
      1 => 'A Storm of Swords',
      2 => 'A Feast for Crows'
    ]
  ]
];