slpctrl Posted August 18, 2008 Share Posted August 18, 2008 Alright, I need to create an array of numbers from 1 to 20,000 and then do a header('location') for each number (basically append the number to a certain part of the URL), it's a complicated thing I'm working on here, I'm doing some testing for possible CSRF here, so I know that all the header('location')'s in the world will work, I just need some advice on how to do this the most efficient. Quote Link to comment https://forums.phpfreaks.com/topic/120136-solved-need-a-bit-of-help/ Share on other sites More sharing options...
Bendude14 Posted August 18, 2008 Share Posted August 18, 2008 <?php $num = range('1', '20000'); foreach($num as $link) { echo "<a href=\"index.php?id=" . $link . "\">" . $link . "</a><br />"; } ?> Is that like what you are after? Quote Link to comment https://forums.phpfreaks.com/topic/120136-solved-need-a-bit-of-help/#findComment-618918 Share on other sites More sharing options...
.josh Posted August 18, 2008 Share Posted August 18, 2008 Think you're going to have to be a bit more specific if you want opinions on greater efficiency, because best we can tell you with no details is a simple loop (not really like bendude's..that just makes a bunch of links on a page). Quote Link to comment https://forums.phpfreaks.com/topic/120136-solved-need-a-bit-of-help/#findComment-618962 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.