title: creating and accessing arrays in liquid templates
body: <p>Was first looking for a means to select certain existing products in order to place title, image, description on another page (or even within another product page - as some products are combined to make other products) within Shopify.</p>
  
  <p>The method below was the only one I seem to come across for creating an array within Shopify. (the split method).</p>
  
  <p>The next part of the equation, is to use the values from {{ myArray }}, to select the matching var, and to then spit out the different values stored within that array.</p>
  
  <p>However, my attempt does not work. Is there a way to add keys to the other arrays (i.e, p1, p2, p3 arrays), in order to make the selecting of them easier during the for loop?</p>
  
  <pre><code>{% assign myArray = "p1|p3" | split: "|" %}
  
  {% assign p1 = "Product One|product-one|This is my description of product one, and it must be a single paragraphy without any html formatting. The length is not an issue.|product_one_image.jpg" | split:"|" %}
  
  {% assign p2 = "Product Two|product-two|This is my description of product two, and it must be a single paragraphy without any html formatting.|product_two_image.jpg" | split:"|" %}
  
  {% assign p3 = "Product Three|product-three|This is my description of product three, and it must be a single paragraphy without any html formatting.|product_three_image.jpg" | split:"|" %}
  
  {% for item in myArray %}
      &lt;h4&gt;{{ item[0] }}&lt;/h4&gt;
      &lt;p&gt;{{ item[2] }}&lt;/p&gt;
  {% endfor %}
  </code></pre>