Reputation: 807
I'd like to post the order of my thumbnails to a text file as an array to be read and echoed by some PHP later. The current file()
function in PHP looks for a character return to signal each array entry.
jQuery:
var order = $('#thumbList').sortable('toArray');
PHP:
$order=file('order.txt');
foreach ($order as $value) {
echo "<img src='gal/img/sml/$value' />";
}
I'm wondering what the best way would be to go about saving and reading an array between jQuery and PHP so that I wouldn't have to reformat the array for each language.
Upvotes: 0
Views: 202