Re: [PHP] unable to use vars in foreach

2004-11-14 Thread Jonathan Villa
ah yes thanks both worked... I had written a function to this... I knew there had to be a much easier way!!! > > On Sunday, November 14, 2004, at 08:36PM, Jonathan Villa <[EMAIL PROTECTED]> > wrote: > >>> >>> On Sunday, November 14, 2004, at 08:24PM, Jonathan Villa >>> <[EMAIL PROTECTED]

Re: [PHP] unable to use vars in foreach [updated question]

2004-11-14 Thread Ryan King
On Sunday, November 14, 2004, at 08:44PM, Jonathan Villa <[EMAIL PROTECTED]> wrote: >So, searching php.net (I swear I did before...) > >I found this at http://us2.php.net/language.types.array > >" You cannot use arrays or objects as keys. Doing so will result in a >warning: Illegal offset type.

Re: [PHP] unable to use vars in foreach

2004-11-14 Thread Ryan King
On Sunday, November 14, 2004, at 08:36PM, Jonathan Villa <[EMAIL PROTECTED]> wrote: >> >> On Sunday, November 14, 2004, at 08:24PM, Jonathan Villa <[EMAIL PROTECTED]> >> wrote: >>> >>>$modules = simplexml_load_file(MODULES); >>> >> >> Are you certain that MODULES has been defined()? And

Re: [PHP] unable to use vars in foreach

2004-11-14 Thread Jonathan Villa
> > On Sunday, November 14, 2004, at 08:24PM, Jonathan Villa <[EMAIL PROTECTED]> > wrote: >> >>$modules = simplexml_load_file(MODULES); >> > > Are you certain that MODULES has been defined()? And what do you get when > you print_r($modules)? > > -ryan > Yes MODULES is defined. It's defined in an

Re: [PHP] unable to use vars in foreach [updated question]

2004-11-14 Thread Jonathan Villa
So, searching php.net (I swear I did before...) I found this at http://us2.php.net/language.types.array " You cannot use arrays or objects as keys. Doing so will result in a warning: Illegal offset type." Neverthought that my var was an object, just thought maybe a string. My new question is, h

Re: [PHP] unable to use vars in foreach

2004-11-14 Thread Ryan King
On Sunday, November 14, 2004, at 08:24PM, Jonathan Villa <[EMAIL PROTECTED]> wrote: > >$modules = simplexml_load_file(MODULES); > Are you certain that MODULES has been defined()? And what do you get when you print_r($modules)? -ryan -- PHP General Mailing List (http://www.php.net/) To unsub