I have a function that, when run completely, doesn't return it's data to the page from which it is called. The tricky part is, that if I put a die(); in at the end of the function, it is getting through it completely and spitting out the last value.
Code: Select all
function getPath($url) {
$parsed = parse_url($url);
$trimmed = ltrim($parsed['path'], '/');
$parts = explode('/', $trimmed);
foreach($parts as $part){
if (!is_numeric($part)){
$combined_parts[] = $part;
} elseif(is_numeric($part)) {
break;
}
}
$string = implode(':', $combined_parts);
return $string;
}this is on the page calling the function:
Code: Select all
<?php
# DFP Omniture Tagging
getDOTPath($_server['REQUEST_URI']."/hockey/nhl/maple_leafs/");
?>
thank you very much.