make array from a list of images with jquery
- by robertdd
i have a list of photos like this:
<div class="upimage">
<ul id="upimagesQueue" class="thumbs ui-sortable">
<li id="upimagesKHGYUD">
<a href="uploads/0002.jpg">
<img src="uploads/0002.jpg" id="KHGYUD">
</a>
</li>
<li id="upimagesNCEEKI">
<a href="uploads/0003.jpg">
<img src="uploads/0003.jpg" id="NCEEKI">
</a>
</li>
<li id="upimagesPWSHUN">
<a href="uploads/0003.jpg">
<img src="uploads/0003.jpg" id="PWSHUN">
</a>
</li>
<li id="upimagesOYJAQV">
<a href="uploads/0004.jpg">
<img src="uploads/0004.jpg" id="OYJAQV">
</a>
</li>
</ul>
</div>
i want to make a function in jquery too get all the images in 1 array to be able to sent the array to php! the array i want to be in this form:
array(
'image_id_1' => array(
'image_src_1' => 'xyz.jpg',
)
'image_id_2' => array(
'image_src_2' => 'xyz.jpg',
)
'image_id_3' => array(
'image_src_3' => 'xyz.jpg',
)
'image_id_4' => array(
'image_src_4' => 'xyz.jpg',
)
)
how i can code this?
thanks