bono_head Posted July 5, 2007 Share Posted July 5, 2007 Hi there! I have this wrapper thingy going on my website. They all have end with a number. From what I can see, the numbering is consistent. My question is this: How can I get the last number for my previus next button? if Itemid=38 then previous = server//index.php?option=com_wrapper&Itemid=37 and next = server//index.php?option=com_wrapper&Itemid=39 ? I used to program in PHP in the old days (few years ago), but I am rusty as h*ll... Can someone help me with this? And also tell me; When does it come back to me? Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 5, 2007 Share Posted July 5, 2007 ok if there will always be a option then you can use this code: Next Button: <?php $var = $_GET[itemid]++; echo("<a href=\"index.php?option=$_GET[option]&Itemid=$var\">Next</a>"); ?> Previous Button: <?php $var = $_GET[itemid]--; echo("<a href=\"index.php?option=$_GET[option]&Itemid=$var\">Previous</a>"); ?> Quote Link to comment Share on other sites More sharing options...
bono_head Posted July 5, 2007 Author Share Posted July 5, 2007 I don't think this code is working the way I want it to. How can I get ONLY the last number of the website-address? It consists of text and numbers. AND the prev / next will be in another frame. It will have to make the main menu page to prev next. Sorry for my bad explaining Quote Link to comment 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.