I would pass two php variables from a codeigniter controller to a javascript function located to the head of my view. is it possible to do such thing?
or just set in your controller your variables
eg - in the controller
$data['newvar'] = $myvar_in_the_controller;
and then in the view in the javascript