|
Posted by news on 09/18/05 02:45
Using php.net I got this far, and so far so good!
But I can't fenagle it quite the way I need to.
I'm creating an array (which I didn't know how to do before today, so a
success for me *g*):
$a = array();
$a[0][0] = "Name";
$a[0][1] = $name;
$a[1][0] = "Message";
$a[1][1] = $msg;
$a[2][0] = "Subject";
$a[2][2] = $subject;
Then I'm feeding it through a pre-defined function (also which I'm
learning how to do, so in general I feel pretty good *g*):
foreach ($a as $v1) {
$fieldname = $v1;
foreach ($v1 as $v2) {
$returned = valid_field($fieldname,$v2);
if ($returned != "true") {
$error .= $returned;
$errflag = "1";
}
}
}
That's the last way I tried. I also tried without the "$fieldname =
$v1;" and using eith $a and $v1 in the first of the two valid_field()
variables.
In all cases, what gets echoed back are: "array" and the correct value
of the second column:
"array", $name
"array", $msg
"array", $subject
If someone could point me to a clue, don't give me the answer, just a
push in the right direction for me to figure it out...because I can't
think of what to try.
Thanks!
Liam
[Back to original message]
|