' single quotes around the PHP block.
Hence it was considered as a string and would have got the value
'["Nov","Dic"]' instead of an array.
<?php $mesi = array('Nov','Dic'); ?> var js_mesi = <?php print(json_encode($mesi)); ?>;
var js_mesi = ["Nov","Dic"];
Refer https://eval.in/920653 for the output