___ ___ erkimt Array is not as array ______ qstntxt ___

I have the following code

%pre%

As you can see, the array is being formed, only that it does not display the array. When we place %code% % in place of% %code% he usually displays the data, now we place %code% % it becomes empty, and the checks I made up displays like this:

%pre%

That is, there %code% % but he says it's not a %code% %

    
______ ___ azszpr27572

Set the charset to connect to %code% . Filmography

  

PHP says: Filmography   This function only works with data with UTF-8 encoding

%pre%     
___

1

I have the following code

<?php
while($data = $QuerySearch->fetch(PDO::FETCH_ASSOC)){

                $js[] = $data;


        }

            $r = array();
            $arr = array();

        foreach($js as $k=>$v){

            foreach($v as $col=>$c){

                $arr[] = $c;
            }

            array_push($r, $arr);



        }

        $r = array_map('htmlentities', $arr);

        if(isset($r)){

            echo 'Existe<br>';

            if(is_array($arr)){

                echo 'Tb existe';
            }else{

                echo 'nao existe arr';
            }
        }else{

            echo 'nao existe';
        }

        echo print_r($r);
?>

As you can see, the array is being formed, only that it does not display the array. When we place echo % in place of% arr[] he usually displays the data, now we place echo json_encode($arr); % it becomes empty, and the checks I made up displays like this:

Existe
Não existe arr

That is, there $arr[] % but he says it's not a array() %

    
asked by anonymous 02.08.2014 / 06:44

1 answer

2
___ ___ erkimt Array is not as array ______ qstntxt ___

I have the following code

$db->query("SET NAMES 'utf8'");

As you can see, the array is being formed, only that it does not display the array. When we place utf8 % in place of% %code% he usually displays the data, now we place %code% % it becomes empty, and the checks I made up displays like this:

$db->query("SET NAMES 'utf8'");

That is, there %code% % but he says it's not a %code% %

    
______ ___ azszpr27572

Set the charset to connect to %code% . Filmography

  

PHP says: Filmography   This function only works with data with UTF-8 encoding

%pre%     
___
02.08.2014 / 08:14