Originariamente inviato da mtx_maurizio
Devi anche controllare che il tag di apertura sia alla prima riga, basta un "a capo" ed è già un output
Codice PHP:
<body>
<?php
session_start();
function RandomText()
{
$texts = array("frase 1", "frase2", "frase3", "frase4", "frase5", "frase di default");
$arrLen = count($texts);
if(!isset($_SESSION['step']))
{
$_SESSION['step'] = 0;
}
else
{
if($_SESSION['step'] < $arrLen - 1)
{
$_SESSION['step']++;
}
}
return $texts[$_SESSION['step']];
}
echo RandomText();
?>
Cosi l'ho messo e non va... non cpisco bene la cosa degli spazi e accapi... dopo body e il primo tag in php...
Scusate l'ignoranza