I'm passing array
via GET
to PHP and then sending to the client side (JavaScript). When I get it it looks like this:
m_prod = [5,,,,,,,,6,,,,,,];
In other words, it is including a space in the positions that do not contain a value! How can I remove these spaces in JavaScript?
<?php
$m_prod = trim($_GET['m_prod']);
print("<SCRIPT language=javascript> m_prod = \"$m_prod\"; </SCRIPT>");
?>