iShaun Posted September 14, 2008 Share Posted September 14, 2008 How do you reverse the order of an array. What i have now it a function that does: function add_location($url,$title) { $this->locations[] = '<a href="'.$url.'">'.$title.'</a>'; } And then this to combine everything: // Get our location. function location() { // Set the location string. $this->core->add_location('?',$this->settings['forum_title']); // For every location set... foreach($this->core->locations as $location) { // Add it to the string. $this->location_str .= ' > '.$location; } } ...And unforutnately, the links come out backwards i.e: > Login > Board Title. How do I fix this? -iShaun Link to comment https://forums.phpfreaks.com/topic/124140-solved-really-quick-question/ Share on other sites More sharing options...
JasonLewis Posted September 14, 2008 Share Posted September 14, 2008 To reverse an array you can use array_reverse(). Link to comment https://forums.phpfreaks.com/topic/124140-solved-really-quick-question/#findComment-640889 Share on other sites More sharing options...
iShaun Posted September 14, 2008 Author Share Posted September 14, 2008 Thanks. Link to comment https://forums.phpfreaks.com/topic/124140-solved-really-quick-question/#findComment-640891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.