note 103780 rejected from function.file-get-contents by danbrown
| From: | danbrown@php.net | Date: | Tue, 03 May 2011 15:09:09 +0000 |
| Subject: | note 103780 rejected from function.file-get-contents by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179376@lists.php.net to get a copy of this message | ||
Note Submitter: gogiddem at gmail dot com
----
I seem to be getting this error message for this script. Does anyone know how I can fix it? Notice
that the code works because the word "love" appears at the end of the error message. I
just need to figure out how to get rid of the error...
This is the code:
$json='{"emotion":"love"}';
$json_a=json_decode($json,true);
echo $json_a[emotion];
?>
This is the output:
Notice: Use of undefined constant emotion - assumed 'emotion' in
/Users/my_computer/Sites/widget_corp/content_test4.php on line 15 love