-2
$cw = array(chr(0)=>455,chr(1)=>455,...,'E'=>521,...chr(134)=>353,chr(135)=>353,...chr(255)=>465);

I have this file that defines an array as seen above (I have just shown a bit of the array for conciseness). Is this array assigning integer values to all of the ascii characters? If so why and also, how do I convert it to JavaScript?

Brian
  • 1,184
  • 2
  • 21
  • 38
user2382321
  • 105
  • 1
  • 10

1 Answers1

0

I don't find it appropriate to explain to you why your code is defining any variables of an array, but please see this post on how to convert a php array to javascript.

https://stackoverflow.com/a/5619038/367456

Or you may use var js_array = [<?php echo '"'.implode('","', $php_array).'"' ?>];

Community
  • 1
  • 1
dcclassics
  • 896
  • 1
  • 12
  • 38