Reply to Putting an array within an array?

Your name:

Reply:


Posted by Phil Latio on 08/24/07 14:05

Still having fun trying to build the perfect form and validation classes and
wondered if anyone can help on the following.

In the following function, how can I make $validationparameters an array so
it can accept multiple values that I can iterate through? Don't need the
iteration part (yet).

function setField($type, $name, $value, $style, $label,
$validationparameter)
{
$this->number_of_fields++;
$this->fields[] = array('type'=>$type, 'name'=>$name, 'value'=>$value,
'style'=>$style, 'label'=>$label,
'validationparameters'=>$validationparameters);
}

This is part written function that I will use to pass the multiple values to
the array.

function setValidationParameters($number, $parameter)
{
$this->fields[$number][validationparameter] = $parameter;
}

I am beginning to confuse myself and wondering if anyone can add some sanity
to what I am doing.

Cheers

Phil

[Back to original 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

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