Hi! I'm new here! I have a quick question about an error I found in my script.
I'll jump straight into the code and then make my question:
$description = $_POST['desc'];
this is a text description for example "Monthly Tuition".
$amount = $_POST['amount'];
price of tuition
$dlnumber = $_POST['cedula'];
drivers license number of the person paying tuition.
foreach($cedula as $key => $cedula) { $description = $description[$key]; echo $description; }
When I run the array $description[$key] through a variable as shown above, the array is echoed properly only on the first loop through. After the first time around, it just spits out the letter "e" instead of the correct variable. However, if I run the following,
foreach($cedula as $key => $cedula) { echo $description[$key]; }
, without first assigning the description to a variable, it runs perfectly!
So, I can obviously see that the loop is doing something funky with the variable. Any ideas why?
Hope I've explained this matter clearly! Thanks for any ideas!
~Shayna