dongsu3138 2011-12-20 22:24
浏览 32
已采纳

打印数组数组的数组

$elementos[$n]['fabricante'] = array($arr3[text][0]);
$elementos[$n]['titulo'] = array($arr[text][0]);
$elementos[$n]['descripcion'] = array($arr2[text][0]);

But I can find a way to show the content of this array.

I get the word Array o a empty text.

Please I have 2 days with this problem. Help

This is the information in the $elementos array

Array ( [0] => Array ( [fabricante] => Array ( [0] => Cisco ) [codigo] => Array ( [0] => ICND1 ) [titulo] => Array ( [0] => Interconnecting Cisco Network Devices I ) [descripcion] => Array ( [0] => Este curso se enfoca en proporcionar las habilidades y conocimientos necesarios para instalar, operar y localizar fallas en una red empresarial pequeña de sucursal, incluyendo configurar un conmutador, un enrutador y conectar a una WAN e implementar la seguridad de la red. El Participante debe poder completar la configuración e implementación de una pequeña red de oficina sucursal con supervisión. ) ) [1] => Array ( [fabricante] => Array ( [0] => Cisco ) [codigo] => Array ( [0] => ICND2 ) [titulo] => Array ( [0] => Interconnecting Cisco Network Devices II ) [descripcion] => Array ( [0] => Este curso se enfoca en proporcionar las habilidades y conocimientos necesarios para instalar, operar y localizar fallas en una red empresarial de tamaño medio para una sucursal, incluyendo la configuración de conmutadores de datos y enrutadores, además de conectar la red LAN a una WAN e implementar seguridad ) ) )
  • 写回答

3条回答 默认 最新

  • duanqi6007 2011-12-20 22:34
    关注

    You can do this a few different ways.

    To inspect the array you can

    echo "<pre>"; // for readability on the browser
    print_r( $elementos );
    

    To view the types of the data in the array

    echo "<pre>"; // for readability on the browser
    var_dump( $elementos );
    

    You could also display the array in JSON, which is useful in some scenarios:

    echo json_encode( $elementos );
    

    I hope that helps

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 彩灯控制电路,会的加我QQ1482956179
  • ¥200 相机拍直接转存到电脑上 立拍立穿无线局域网传
  • ¥15 (关键词-电路设计)
  • ¥15 如何解决MIPS计算是否溢出
  • ¥15 vue中我代理了iframe,iframe却走的是路由,没有显示该显示的网站,这个该如何处理
  • ¥15 操作系统相关算法中while();的含义
  • ¥15 CNVcaller安装后无法找到文件
  • ¥15 visual studio2022中文乱码无法解决
  • ¥15 关于华为5g模块mh5000-31接线问题
  • ¥15 keil L6007U报错