
April 7th, 2009, 05:33 PM
|
|
Registered User
|
|
Join Date: Feb 2009
Posts: 3
Time spent in forums: 55 m
Reputation Power: 0
|
|
|
Trying to get an array, but getting a string
I'm trying to receive values from fields that are contained in an XFA PDF form, so it is in XML format.
The XML form has repeating subforms in it, and the repeating field within the subforms that I'm trying to work with right now is just a field called "A".
For now, if I use a for loop, or var_dump, I keep getting the last value for "A" returned as a string.
Here's the parsing PHP
Code:
$aA = $_POST['A'];
$A = array($aA);
$counta = count($A);
for ($int=1; $int<=$counta; $int++)
{
echo "$aA[$int]";
}
echo "Dump Array All Headers A</br>";
var_dump($aA);
You might be able to tell that I'm still somewhat new to how to use these PHP functions in which context.
right now the for loop isn't working at all, but the var dump is giving me this in the output:
.Dump Array All Headers A
string(2) "4."
"4" is the last value in the "A" field, but there was a previous "A" value that was "2".
Why am I not seeing this?
|