Re: [PHP] Re: array or list of objects of different types

2010-04-03 Thread Peter Pei
var_dump( array( true , 12 , php already does this ) ); array(3) { [0]= bool(true) [1]= int(12) [2]= string(21) php already does this } :) Yeah. But this feature of PHP is a boon if used carefully and a curse if careless. You can get AMAZING results if you're not careful to

[PHP] Re: array or list of objects of different types

2010-04-02 Thread Nathan Rixham
Php Developer wrote: Hi all, I want to be able to have an array of elements of different types. As an example: the first element is a boolean, the second is an integer, and the thirs is a string. In php there is no typing, i'm just wondering if there is a way to have that, it would be

Re: [PHP] Re: array or list of objects of different types

2010-04-02 Thread Nilesh Govindarajan
On 04/03/10 05:42, Nathan Rixham wrote: Php Developer wrote: Hi all, I want to be able to have an array of elements of different types. As an example: the first element is a boolean, the second is an integer, and the thirs is a string. In php there is no typing, i'm just wondering if there