Jamroom Logo
Newsletter
Member Spotlight
418034
mZeus.com
"Jamroom has been great. The software works very well. I used to manually upload tracks, but now my artists upload their own tracks! The site is now completely automated thanks to Jamroom. Customer service is also Excellent! Whenever I had problems, I was able to find and get the answers in the forum."
Follow Jamroom on Twitter!

{jr_also_bought} Index {jr_barcode}

{jr_array}


{jr_array} is used within a Jamroom template to assign indexes and values to a template array.  This is most commonly used to prepare an array for use in the {jr_ranking}, {jr_chart}, and other embeddable custom functions.

Parameters:

Name Type Required Default Description
name string yes n/a the name of the template array the key -> index value will be added to.  If the array does not exist, the function will create it.
key string yes n/a name of key (index) to add to array
value string yes n/a value to assign to key (index) in named array
explode yes/no no no If the explode parameter is given, then Jamroom will run the PHP explode() function on the value before assigning the results to the array.  The default explode separator is a comma (,).
separator string no , If you would like explode to use a different separator, you can define that in the separator param.


Example:

Example using {jr_array} to prep the "band_id" array and passing it to the {jr_ranking} embedded function:

{jr_array name="band_id" key="0" value="25"}
{jr_array name="band_id" key="1" value="36"}
{jr_array name="band_id" key="2" value="51"}
{jr_ranking mode="spotlight" band_id=$band_id}

Example:

Example using {jr_array} to explode a comma separated list and pass it to the {jr_ranking} embedded function:

{jr_array name="genre" value=$BAND_GENRE explode="yes"}
{jr_ranking mode="artist" genre=$genre}

{jr_also_bought} page 98 of 171 {jr_barcode}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom Core
Jamroom Addons
Jamroom Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2012 Talldude Networks, LLC.