C
cordmcphail
Hello,
Is there a similar function in JS as the PHP foreach() loop?
PHP Ex.
foreach($something as $key => $value)
{
execute code here;
}
I have created an object in JS:
var ibm = new Object();
ibm['0'] = 240;
ibm['1'] = 241;
ibm['2'] = 242;
ibm['3'] = 243;
etc...
and I want to access it as
if($key == $somthing)
{
$this = $this;
}
Any help appreciated!
Cmac
Is there a similar function in JS as the PHP foreach() loop?
PHP Ex.
foreach($something as $key => $value)
{
execute code here;
}
I have created an object in JS:
var ibm = new Object();
ibm['0'] = 240;
ibm['1'] = 241;
ibm['2'] = 242;
ibm['3'] = 243;
etc...
and I want to access it as
if($key == $somthing)
{
$this = $this;
}
Any help appreciated!
Cmac