incrediBILL - 4:45 pm on Jul 1, 2013 (gmt 0)
Well, he's generating the HTML code here so the ".php" needs to be stripped out of the URL the PHP is writing.
You need something like this:
$url=str_replace ( ".php", "" , $url );
Then of course you need Apache rewrite rules to convert from no extension to .PHP