6
The system gives me a Javascript matrix to work on the page. I can get this array with PHP, but I don’t know how to convert Javascript to PHP and work using PHP.
This is an example of the Javascript matrix:
<script type="text/javascript">
  var uCatsOut=[
    //['ID','ParentID','isSection','Name','Descr','URL','NumEntries']
    ['1','0','0','categoria A','Descrição da categoria A','/board/categoria_a/1','1'],
    ['2','0','0','Categoria B','Descrição da categoria B','/board/categoria_b/2','0']
  ];
</script>I want to leave it like this:
$categ = array(
    '0' => array('1','0','0','categoria A','Descrição da categoria A','/board/categoria_a/1','1'),
    '1' => array('2','0','0','Categoria B','Descrição da categoria B','/board/categoria_b/2','0'),
);
I believe that if you serialize in JSON using Javascript and de-serialize using PHP you will get exactly what you want.
– mgibsonbr