Wolfzmus Wolfzmus - 6 months ago 35
PHP Question

Call array ['items'] not working

I have problem with my array, when i try var dump my aray is show like this

Example :


result is :
array(3) { ["items"]=> object(mysqli_result)#3 (5) { ["current_field"]=> int(0) ["field_count"]=> int(1) ["lengths"]=> NULL ["num_rows"]=> int(6358) ["type"]=> int(0) } ["count"]=> int(6358) ["exist"]=> bool(true) }

But when i try call

it said
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Why i cant call
??? Did i do something worng??

my php is
PHP Version 5.3.10-1ubuntu3.4

Answer Source

my php is PHP Version 5.3.10-1ubuntu3.4

Since PHP 5.4 it's possible:

Source : https://secure.php.net/manual/en/language.types.array.php#example-62

till then

$some_variable = $mastervendor->listvendor();

On PHP 5.3 or earlier, you have to use a temporary variable.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download