marain
07-26-2012, 10:13 PM
My script doesn't work, i.e. page loads blank. I've isolated the problem to a single statement but am unable to find the syntax error. I suspect it's simple but still it eludes me. Can someone help? I've flagged the errant statement:
<?php
$lastUpdate = date( "j F Y", filemtime( "pageContent/quotations.txt" ) );
$quotations = array(
"This is quotation one",
" ",
"This is quotation two.",
"North Carolina G.S. 90-210.25(c)(9)",
);
$noAuthor = " ";
$bigIndex = rand(0, (count($quotations) -1)) &65534;
echo "<br /><br /><div class='quotations'> {$quotations [$bigIndex]} <br /><br /><div align='right'>";
// Syntax error has been isolated to the following statement
if ({$quotations [$bigIndex + 1]} != $noAuthor) {
echo "- {$quotations [$bigIndex + 1]}";
}
// Error has been isolated to the preceding statement
echo "</div></div>";
?>
<center>*** Click <a href="http://www.MarainLaw.com/quotations"><span style="color : #ff4040; ">Here</span></a> for a different quote. ***</center>
<?php
$lastUpdate = date( "j F Y", filemtime( "pageContent/quotations.txt" ) );
$quotations = array(
"This is quotation one",
" ",
"This is quotation two.",
"North Carolina G.S. 90-210.25(c)(9)",
);
$noAuthor = " ";
$bigIndex = rand(0, (count($quotations) -1)) &65534;
echo "<br /><br /><div class='quotations'> {$quotations [$bigIndex]} <br /><br /><div align='right'>";
// Syntax error has been isolated to the following statement
if ({$quotations [$bigIndex + 1]} != $noAuthor) {
echo "- {$quotations [$bigIndex + 1]}";
}
// Error has been isolated to the preceding statement
echo "</div></div>";
?>
<center>*** Click <a href="http://www.MarainLaw.com/quotations"><span style="color : #ff4040; ">Here</span></a> for a different quote. ***</center>