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 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误