I have this jQuery script with .load() function and this script saved on file named header.php:
$(document).ready(function() {
$('.my-wrapper').find(".wrapper-area").append('<div class="loadergif"></div>').load("file001.php?key=XXXXXX", function() {
$(this).find('.wrapper-area').remove('.loadergif');
var $container = $('.list-wrap');
$container.imagesLoaded( function(){
$container.masonry({
itemSelector : '.my-wrapper'
});
});
});
on the other side, I have this PHP variables on file named body.php :
while($row = mysql_fetch_array($result)){
$Key = $row['key'];
echo '<div class="wrapper-area">';
//jQuery script will produce something here
echo '</div><!-- .wrapper-area -->';
}
now the problem is how to bring that $Key from PHP file becomes XXXXXX part of jQuery script : 'file001.php?key=XXXXXX'
please note that $Key is dynamically generated from WHILE loop. means, it has different value each loop cycle.
thanks before