json_encode() in eclipse php causes Call to undefined function json_encode() error-Collection of common programming errors

I have created a php project in the eclipse pdt. When I attempt to call java_encode, I get a “Call to undefined function json_encode()” error. Other functions in the PDT’s php core api do not do this.

Here is a code

$arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
echo json_encode($arr);

The second line causes the error. Do I need an include or require? I am new to using json with the eclipse PDT. Help is needed. Thank you!

Originally posted 2013-11-10 00:17:35.