Can you guys help me?
Inside some php code i have a string variable $html as:
$html.='<img class="page_img current_thumb" src="'.site_url().'assets/admin/'.$data['edp_image'].'" alt="" title="" id="img_'.$i.'" onclick="return set_active('.$pub_id.','.$ed_id.','.$eddt.','.$i.','.$data['edp_page_num'].','.$tot_pages.');" id="img_'.$i.'" />';
Now the variables $pub_id
,$ed_id
,$i
,$tot_pages
and $data['edp_page_num']
all contain integer values while the variable $eddt
contains a date(like->2018-05-12)
When the variable $html
is rendered, the onclick function looks like
return set_active(2,2,2018-04-15,1,1,2);
My question is how to pass the date value as '2018-04-15' and not as 2018-04-15.