PHP Array Boundaries
Posted: Wed Apr 25, 2007 10:13 pm
I am currently designing a sort of web IDE for development, and currently I'm facing a problem in which I don't know how to get an array boundary (i.e., the account/number of how many elements it contains) for tasks such as accounting code lines, etc.
Should I use something like foreach for counting, even when it could make processing double-slow, first for accounting the elements and then for doing whatever with them, or is there some function? I haven't found yet some function like $elements=get_array_limit($myarray) which could easily return the number of elements.
Should I use something like foreach for counting, even when it could make processing double-slow, first for accounting the elements and then for doing whatever with them, or is there some function? I haven't found yet some function like $elements=get_array_limit($myarray) which could easily return the number of elements.