Latest news
Home » javaScript » Convert php array to javascript array

Convert php array to javascript array

//php array
$smarttips_php_array[] = array('sijo','thomas','maprayil');
//covert php array to javascript array
var smarttips_js_array = [<?php echo '"'.implode('","', $smarttips_php_array).'"' ?>];

Leave a Reply

x

Check Also

Restrict ckeditor to basic toolbar

We can use javascript or jquery to apply ckeditor configuration HTML <textarea id=”textarea” cols=”15″ name=”txtdesc” ...