![]() |
Objects question
Hi
Dumb question, but I can't figure this simple thing out... I have an array of objects: Code:
var monthlyDP:Array = new Array({label:"1st", X:"first"},{label:"2nd", X:"second"},{label:"3rd", X:"third"},{label:"4th", X:"fourth"},{label:"last", X:"last"});Is it a case of having to also know the index of that object, or is there a way to seach and array like this when you know the label of the object, and just want the value? Thanks! |
Hi there,
I'm hoping I understand your question right but I'll try: would it be possible for you to use a dictionary for this? (associative array, same thing) and say something like: PHP Code:
that way you get direct access. Of course there are multiple ways of doing this. Hope that starts you in the right direction. -Adam |
THAT would be SOOOOOOO much easier. I'm going to try it. Thank you!
|
| All times are GMT +1. The time now is 01:06 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.