rendered paste body<?php// Function getRouteTable// { // Name: getRouteTable // Args: array getRouteTable() // Desc: Returns the routing table. // BeginCode function getRouteTable() { // Get the raw data. $route = $_GET['r']; if((empty($route)) === true): $route = 'index'; endif; // Remove unwanted chars. if($route[0] == '/'): $route = ltrim($route, '/'); endif; $last = (strlen($route) - 1); if($route[$last] == '/'): $route = rtrim($route, '/'); endif; // Make the string to an array. $routeExtra = explode('/', $route); // Check all the route one more time. unset($route); $max = count($routeExtra); for($i = 0; $i < $max; $i++): if(preg_match('/[a-zA-Z.+_-]+/', $routeExtra[$i]) == 0): unset($routeExtra[$i]); else: $route[] = $routeExtra; endif; endfor; return $route; } // EndCode// }?>