Jump to content

What am I doing wrong here..?


woolyg

Recommended Posts

Here's my javascript:

 

for(i=0;i<=20;i++)
{
   // msg_data_array is a string with 20 items in it, all delimited by 2 hashes - ##
    var msgtext = msg_data_array[i].split('##');
}

 

 

The script returns msgtext just fine, but I'm getting an error in firebug:

 

  msg_data_array is undefined

 

.. Can anybody shed any light on this?

 

All info appreciated.

 

Thanks

WoolyG

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/248382-what-am-i-doing-wrong-here/
Share on other sites

Can you show the code in context? There doesn't appear to be anything wrong with the statements you've shown, so it's likely something else around them. Also you quote the error, is that the exact error? If it was "msg_data_array is undefined", then it's because that index doesn't exist.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.