note 103780 added to function.file-get-contents

From: Date: Tue, 03 May 2011 15:05:29 +0000
Subject: note 103780 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-179375@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.197 Probable Submitter: 69.255.16.158 ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- https://master.php.net/note/edit/103780 Del: integrated -- https://master.php.net/note/delete/103780/integrated Del: useless -- https://master.php.net/note/delete/103780/useless Del: bad code -- https://master.php.net/note/delete/103780/bad+code Del: spam -- https://master.php.net/note/delete/103780/spam Del: non-english -- https://master.php.net/note/delete/103780/non-english Del: in docs -- https://master.php.net/note/delete/103780/in+docs Del: other reasons-- https://master.php.net/note/delete/103780 Reject -- https://master.php.net/note/reject/103780 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179375) next »