Make variable number of items displayed on one page.
Prepare a number of array.
$coin = ["Bitcoin", "Ethereum", "Ripple", "Litecoin", "Ethereum Classic", "DASH", "Bitshares", "Monero", "NEM", "Zcash", "Bitcoin Cash", "Bitcoin Gold", "Monacoin", "Lisk", "Factom"]; $array_num = count($coin); $page = 2; $number = 4; $i = 0; foreach($coin as $value){ if(($number * ($page - 1) - 1 < $i) && ($i < $number * $page)){ echo $value . "<br>"; } $i++; }
-> Ethereum Classic
DASH
Bitshares
Monero
It’s ok to change the variables, page and page_number with button.
It was easier than I thought♪