On 10/5/06, sit1way <[EMAIL PROTECTED]> wrote:
Hey all.
I've got a simple object method that sets object vars based on a passed
array:
**
function set($arr) {
foreach($arr as $name => $value) {
if(is_array($this->name)) {
It may be easier to do:
$array = $this->$name;
$array[] = $value;
Some combination of {} and $this->{$name}[] = $value may also work...
As it stands now, $name[] looks like you are trying to get an index on
$name FIRST, and then use $this-> on that SECOND...
I think.
On Thu, October 5, 2006 11
2 matches
Mail list logo