You are here: Re: referring to an object member -- still questions « PHP Programming Language « IT news, forums, messages
Re: referring to an object member -- still questions

Posted by Rainman on 12/21/05 04:57

cross at php net wrote:
> Hrm, why do you have each day as a seprate member variable?

Well, because it comes from the database that way where there are
columns named 'sunday,'monday','tuesday', etc. I can't change the database.
>
> I would set it up as , an example:
> $obj->dayOfWeek['sunday']
>
> dayOfWeek being an array to hold each of the separate days data.....
>
This requires changing the database, or adding substantial code to fake
it. Is there no simpler way to refer to it similar to this: $obj->$dow
where $dow could be 'sunday, 'monday', etc.?

Mark

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация