i have a variable $visitRecord->getReferallist() which get the list of doctors in an array . i need to send the array to a php file and do foreach action in php file.. how do i send this array variable in the jquery . This code did not work.
function seekOpinion()
{
var queryUrl = "<?php echo $this->url(array('controller' => 'consultant', 'action' =>'opiniondoclist'));?>";
$.post(queryUrl,{referal:'<?php echo $gotreferal; ?>',visitId:'<?php echo $gotvisitId; ?>',referalList:'<?php echo $visitRecord->getReferallist(); ?>'},function(data)
{
$('.opiniondoclistData').html(data);
});
document.getElementById('opiniondoclistDiv').style.display = "";
}