Tagged: , ,

Viewing 1 reply thread
  • Author
    Posts
    • #6036

      hello i’m creating a widget with 3 fields, image, title and url, at this moment everything is working like a charm, but when i want to print widget array i got this error in array.

      Piklist file

      <?php
      piklist('field', array(
          'type' => 'group'
          ,'label' => __('Publicidad') 
          ,'add_more' => true
          ,'fields' => array(
            array(
              'type' => 'file'
              ,'field' => 'image',
              'label' => 'Imagen'
            ),
            array(
              'type' => 'text'
              ,'field' => 'titulo',
              'label' => 'Titulo'
            ),
            array(
              'type' => 'text'
              ,'field' => 'url',
              'label' => 'Enlace'
            ),
          )
        ));

      Print_r of $settings

      Array
      (
          [image] => Array
              (
                  [0] => 13
                  [1] => Array
                      (
                          [0] => undefined
                          [1] => 15
                      )
      
                  [2] => Array
                      (
                          [0] => undefined
                          [1] => 14
                      )
      
              )
      
          [titulo] => Array
              (
                  [0] => title---
                  [1] => title---
                  [2] => title---
              )
      
          [url] => Array
              (
                  [0] => http:...
                  [1] => http:...
                  [2] => http:...
              )
      
      )

      first array position retrives image id, but second and third no.

      Another question, is how can i loop into this array? i want to do this because i need to set random ads and posts.

      Thanks!

    • #6050
      Steve
      Keymaster

      @cegodai– Try using our beta. The array is easier to work with.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.