Hi,
I'm having trouble shaving some neighboring arrays :-) Seriously, this thing is driving me crazy! The concept is that I am submitting a form that collects its data into an array called $form. So the data are something like: $form[username], $form[password], $form[password2], etc.
The thing is that I want to trim any white spaces before or after the value in each field of my array. This is what I did on the top of the file.
<?
//Check to see if goal is to register
if ($what == "register")
{
$form = trim($form);
//I'm doing this below to check if the
//array's been shaved off. But it is not
//working though.
foreach ($form as $temp)
{
print "$idiot<br>";
}
}
?>
The thing is that the $form element-array is not being shaved off (boy do I like the term "shave off" this night). Anyone has a solution to my everlasting problem?
Well, anyhow, thanks in advance.
Ilir.