views:

100

answers:

1

I get the Error

Fatal error: Call to undefined function getAvnet() in C:\xampp\htdocs\ems\app\controllers\queries_controller.php on line 23

when accessing the source file attached.

The line is:

$ret = getAvnet('de', $searchstring);

supposably calling

function getAvnet($country, $query)

The Source File

+1  A: 

You need to use

$ret = $this->getAvnet('de', $searchstring);

In general you need to use $this-> when accessing class methods and variables.

Read: http://php.net/manual/en/language.oop5.basic.php

quantumSoup
Thank you very much for that! There seams to be something else I do totally incorrectly for getting these error messages:Notice (8): Undefined variable: ret [APP\controllers\queries_controller.php, line 92]Notice (8): Undefined variable: ret [APP\controllers\queries_controller.php, line 126]Warning (2): array_shift() expects parameter 1 to be array, null given [APP\controllers\queries_controller.php, line 24]Warning (2): array_push() expects parameter 1 to be array, null given [APP\controllers\queries_controller.php, line 24]Warning (2): Invalid argument supplied for foreach()
Timothy
Do you see what's happening there?
Timothy
@Tim Edit your question and put the errors there, it's really hard to read as it is.
quantumSoup