In my site, I have a JS file which calculates something I currently have the global variable My variables are defined as.
I want them to be dynamic, this means that I want them to drag the value from the mysql database. I know that this is possible with AJAX:
Example:
$ Ajax ({url: 'call.php', datatype: 'jason'}) done (function) (var tag_name = data [0]; var client_id = data [1];});
However, it is suitable for some values (say 2 to 10). There are several variables (about 200) in my case. I think it's not a good idea to create an array of size 200 or more.
If I am wrong please correct me or if it is a better solution, please motivate me :).
Thanks
If you have more than 200 variables as you type here , I think that you are arranging the code incorrectly. You should organize the code into an object that represents the object mapping of your database and calls the php function according to your requirements.
Comments
Post a Comment