<?php // split up extra href to get variables $vars = explode('/', $_SERVER['PATH_INFO']); array_shift($vars); reset($vars);
// convert vars into php variables for ($i=0; $i<count($vars); $i=$i+2) {
$key = $vars[$i];
$value = $vars[$i + 1];
// avoid super long input
$string_max_length = 100;
$key = substr($key, 0, $string_max_length);
$value = substr($value, 0, $string_max_length);
// evaluate as variables
eval("$$key = $value;");
} ?>
|
|