I am creating javascript array dynamically using php for instance I will take one example here
<?php
echo "<script>
var array={
'A' : {
'a':123 ,
'b':[[1,2],[3,4]]
}
};
function dum(arr)
{
window.alert(arr);
}
dum(array['A']['a']);
</script>";
?>
In my case array
which I created holds some very important information which I do not want to share with any of my client, since its impossible to mask view source in browser which I understood from my previous post, so I would like to encrypt it before echo
so that in view source client won't be able to understand what this array is, what this array contains, and then I am sending this array to my function in this case its dum
, inside function dum
I would like to descrypt it, and then I will process.
I hope my approach is clear, negative voters kindly comment so that I will understand my mistake.