A: 

If you are returning a json value use json to read that.

See http://api.jquery.com/jQuery.getJSON/

http://pinoytech.org/blog/post/How-to-Use-JSON-with-jQuery-AJAX

Here is an example to read json value

$('document').ready(function(){
    $('#submit).click(function(){
        $.post('your_php_page.php', {employee_id: '456'},
            function(data){
                console.log(data.first_name);
                console.log(data.last_name);
            }, 'json');
    })
});

Hope it helps

Starx
+5  A: 

Your data is not URL-encoded. Try do something like this,

$.ajax({ type: "GET", 
         url: "c.php", 
         data: {"dia":matriz[0], "mes":matriz[1] ....},    
         success: Mundo, 
         error: function(e){ alert('Error: ' + e); } 
});
ZZ Coder
A: 

You have a crazy problem. According to your question:

$mierda = array();
$mierda[0] = $_GET['dia']; //... and so on
echo json_encode($mierda);

works while:

echo $_GET['dia'];

doesnt. Try:

$mierda = array();
$mierda[0] = $_GET['dia'];
echo $mierda[0];

echo $_GET['dia'];

It will show you whether the problem is in the PHP, or the javascript.

digitalFresh
A: 

I have encoded the data as ZZColer said and the error is still.

Starx, it's not a question of the returning.

digitalFresh, in fact the error is from PHP because I can copy $_POST, $_GET array to a new array and print all this information but if I put after all things like:

If( mierda[0] == 0) {... The element is empty! and if I try directly $_GET['dia'] it says that this element doesn't exist in the array. Also I have tried $_GET[dia] or $_GET[0] without a solution.

PD:

I don't know how but PROBLEM SOLUTIONED!

Thanks to all!

Eureka