$tot_pages = explode("[NP]", html_entity_decode ($articolo));
$page = isset($_GET['page']) ? !is_numeric($_GET['page']): 1;
$url= $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
// Stampo la pagina richiesta
echo "<p>" . $tot_pages[$page - 1] . "</p>";
for ($i = 1; $i < count($tot_pages)+1; $i++)
{
if ($i == $page) {
echo "<b>$i</b> ";
}else{
echo "<a href=\"" . basename($url) . "-".$i."\">$i</a> ";
}
}