Microsoft
Software
Hardware
Network
Question : JS Object Key Variable?
var tool = 'something'
stack = { tool : 'data'}
it always returns key as "tool" instead of the value of "tool" which is "something"
im trying to accomplish the following in JS but here is a PHP example
$tool = "something";
$stack[$tool] = data;
i know its not pretty.....
Answer : JS Object Key Variable?
use :
1: 2: 3: 4:
var stack = {}; var tool = 'something'; stack[tool] = 'data'; //alert(stack.something);
Random Solutions
php object iteration code improvement
SQL 2005 log shipping vs replication question.
PHP MySQL SELECT OPTGROUP parent value
Mount a USB hdd on a Hyper-V guest
Trouble programmatically getting a list of the files on FTP server in VB.NET
Changing Default Web Site Properties
How do I convert a numeric entry to a text value (numbers to words)
sbs 2008 windows update failing - error 8024402C
exchange 2010 CAS high availablity/ISA or harware load balancing
what is the best linux distro and ide for web programming (PHP) ?