13
rated 0 times
[
14]
[
1]
/ answers: 1 / hits: 16090
/ 11 Years ago, mon, september 16, 2013, 12:00:00
I have this code in php to translate in js (node to be precise)
$config['test'] = array(
something => http://something.com/web/stats_data2.php
,somethingelse =>http://somethingelse.com/web/stats_data2.php
,anothersomething =>http://anothersomething.com/web/stats_data2.php
);
So I started to write this:
config.test = [
something = 'http://something.com/web/stats_data2.php'
, somethingelse = 'http://somethingelse.com/web/stats_data2.php'
, anothersomething = 'http://anothersomething.com/web/stats_data2.php']
But I m not sure if it s not supposed to be writed like this instead:
config.test.something = 'http://something.com/web/stats_data2.php';
config.test.something = 'http://somethingelse.com/web/stats_data2.php';
config.test.anothersomething = 'http://anothersomething.com/web/stats_data2.php';
The goal is, if I do console.log(config.test.['something']);, to have the link in the output.
Is there any way to test it without server (since I don t have any before tomorrow), or is my syntax good?
More From » php