Putting data onto the POST array

Putting data onto the POST array

I have been tearing my hair out with this for the past 12 or so hours and am no closer to a solution than when I began.

I have a jquery function to dynamically create <li> tags for an unordered list:

  1. $(function() {
  2.     var idealist = $('#idealist'); 
  3.     $('.checklist').click(function(event){      
  4.         item = '';       
  5.         $(idealist).empty('li');
  6.         $('.selectitem').find(':checkbox').each(function(){
  7.             if($(this).is(':checked')){             
  8.                 var caption = $(this).parent().parent().parent().siblings('div.caption').html();
  9.                 var image = 'li#'+$(this).attr('value')+' img';
  10.                 var thumb = '<img id="idea-image-'+$(this).attr('value')
  11.                                + '" src="'+$(image).attr('src')
  12.                                + '" title="'+ caption + '" alt="'+ caption + '" width="20" height="20" />';
  13.                 idealist.append($('<li class="idealist-item"'
  14.                                           + ' id="' + 'idealist-item-' + $(this).attr('value') + '">'
  15.                                           + thumb + '<div>' + caption + '</div></li>'));   
  16.             }
  17.         });
  18.     });
  19. });
This is working fine. The problem is I need to somehow pull the ids from each <li> tag into a string or an array that can be made available somehow to php code for further processing. I can create the string or array within my jquery function but can't figure out how to make that available to php. Can anyone offer some suggestions?