This question already has an answer here:
I wrote a code that worked perfectly fine, but then I reinstalled my operating system, and now when I try to run this, I keep getting this error. I am using IIS 8.0, WebMatrix, and PHP 5.3.
This is the piece of code in question:
<?php
if (!$me->get_details()['quote']) : //<--error is here
?>
<p class="quote">Write some motivational quote.</p>
<?php
else :
?>
<p class="quote"><?= $me->get_details()['quote']?></p>
<?php endif; ?>
Function get_details() returns an associative array with data from the database.
What could possibly go wrong here?