leendo un poco mas tengo esto:
Código Javascript
:
Ver original<script>
var zNodes = new Array();
<?php
for ($i = 0; $i < count($this->list); $i++){
?>
zNodes[<?php echo $i ?>][0].id = new Object();
zNodes[<?php echo $i ?>][0].id = <?php echo $this->list[$i]['id']; ?>;
zNodes[<?php echo $i ?>][0].pId = new Object();
zNodes[<?php echo $i ?>][1].pId = <?php echo $this->list[$i]['pId']; ?>;
zNodes[<?php echo $i ?>][0].name = new Object();
zNodes[<?php echo $i ?>][2].name = "<?php echo $this->list[$i]['name']; ?>";
zNodes[<?php echo $i ?>][0].open = new Object();
zNodes[<?php echo $i ?>][3].open = true;
<?php
}
?>
</script>
pero aun asi tengo este mensaje
Cita: TypeError: zNodes[0] is undefined
var zNodes = new Array();