what i need
- i need to call onclick function from php file.
php code
$content .= '
<div class="evt_date" >
<meta itemprop="startDate" content="'.$data[$k]['startDate'].'">
<meta itemprop="endDate" content="'.$data[$k]['endDate'].'">
<span><button type="button" class="btn btn-primary btn-listing" onClick="favaorite('.$data[$k]['id'].',"'.$data[$k]['city'].'","'.$data[$k]['country'].'","'.$data[$k]['event_url'].'")">Addtofavorite</button>
</span>
javascript code
function favaorite(sess_id,city,country,event_url)
{
console.log(sess_id);
console.log(city);
console.log(country);
console.log(event_url);
}