Instantiate dynamic array Magento

Posted by Tegan Snyder on Stack Overflow See other posts from Stack Overflow or by Tegan Snyder
Published on 2010-03-26T18:33:49Z Indexed on 2010/03/27 1:23 UTC
Read the original article Hit count: 233

Filed under:
|
|

Kick me if I'm being silly but some some reason I'm having a heck of time building a dynamic array in magento.

Example:

$data = array();

$data[0] = 'test';
$data[1] = 'what';

I keep getting an ERROR:
Notice: Undefined offset: 0

Any ideas? Do I need to handle these arrays differently since they are in a class?

© Stack Overflow or respective owner

Related posts about magento

Related posts about php