I cannot print the array on the server

Asked

Viewed 31 times

1

locally the data leaves, but hosted does not work.

function teste(){
    return array(
        "importancia" => array(
            "Customer el",
            "Over ",
            "Ovedde (MPG)"
        ),
        "dados"=> array(
            "Customer care: xthe sdsdel",
            "Overall d.",
            "asd"
        ),
        "question"=> array(
            "Icvxcv",
            "Iasdasd"
        )
    );
}


$teste = teste()['importancia'];
echo count($teste);

locally appears echo = 3; now when I host the page on the server, the page simply goes blank.

The external host version is 5.3.3-7 and the one installed on my computer is 5.5.9.

  • What version of php on your hosting and localhost?

  • excuse the ignorance, but as I see the php version in my hosting?

  • create a new file with this content: <?php phpinfo();

  • PHP Version 5.3.3-7+squeeze26

  • PHP Version 5.3.3-7+squeeze26 -> servidor || 5.5.9 -> local

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.