Title: Memory error using [array]
Last modified: September 1, 2016

---

# Memory error using [array]

 *  [macra](https://wordpress.org/support/users/macra/)
 * (@macra)
 * [10 years ago](https://wordpress.org/support/topic/memory-error-using-array/)
 * I am using the custom content shortcode plugin in conjunction with ‘ultimate 
   member’to create a directory listing. In the basic listing I’m using the array
   shortcode to display the contents of a custom field that is an array like this.
 * [array user_field=”listing_category” debug=true] [field “1”] , [field “2”][/array]
 * In debug mode the list shows the contents of the array as thus;
 * Array
    ( [0] => Baby [1] => Electronics and telecom [2] => Gifts and flowers )
 * However, if I add [field “0”] or [field 0] to the list, I get the fatal memory
   error;
 * Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate
   71 bytes) in /home/waitara/public_html/2016/wp-includes/shortcodes.php on line
   214
 * I’ve become quite frustrated trying to resolve this.
    Any suggestions?
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [macra](https://wordpress.org/support/users/macra/)
 * (@macra)
 * [10 years ago](https://wordpress.org/support/topic/memory-error-using-array/#post-7462978)
 * I changed the shortcode to output an unordered list as follows;
 * [array user_field=”listing_category” debug=true ]
    - [field value]
    - [/array]
    - and while it does display all of the array contents including the ‘0’ data,
      it adds them all as one list item like this;
    -  •BabyElectronics and telecomGifts and flowers
    - If I add ‘each=true’ to the array shortcode it just displays the first letter
      of each array item.
    - • B
       • E • G
    - etc.

Viewing 1 replies (of 1 total)

The topic ‘Memory error using [array]’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [macra](https://wordpress.org/support/users/macra/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/memory-error-using-array/#post-7462978)
 * Status: not resolved