Hello,
I am working on an array that holds ID numbers for a list of employees. This is what I have:
[PHP]<?php
$uniqueID = array();
$uniqueID(0) = 11102487;
$uniqueID(1) = 11194710;
$uniqueID(2) = 11237894;
...
$uniqueID(127) = 94512796;
?>[/PHP]
What I want to do, is have it read from the above list. The web site would have a previous and next button.
So as default, Previous would be disabled, and then ID(0) would show. Next would go to ID(1), and then ID(2), etc. Each ID has it's own .php page. So what I want is, a next button that would be like, <a href="$uniqueID (1).php">Next</a> and have the number in the () increment by 1 per click. I know a counter would be needed, and a loop, but I'm not sure where everything should go. I'm a PHP n00b.
Any suggestions/snippets that'll point me in the right direction?
Thanks!
I am working on an array that holds ID numbers for a list of employees. This is what I have:
[PHP]<?php
$uniqueID = array();
$uniqueID(0) = 11102487;
$uniqueID(1) = 11194710;
$uniqueID(2) = 11237894;
...
$uniqueID(127) = 94512796;
?>[/PHP]
What I want to do, is have it read from the above list. The web site would have a previous and next button.
So as default, Previous would be disabled, and then ID(0) would show. Next would go to ID(1), and then ID(2), etc. Each ID has it's own .php page. So what I want is, a next button that would be like, <a href="$uniqueID (1).php">Next</a> and have the number in the () increment by 1 per click. I know a counter would be needed, and a loop, but I'm not sure where everything should go. I'm a PHP n00b.
Any suggestions/snippets that'll point me in the right direction?
Thanks!
Comment