Forum Moderators: coopster
I'm going to be accessing variables via arrays...yet typing this:
$ordersArray = array();
array_push($ordersArray, $field_qty1);
then using:
<?php print $ordersArray[0];?>
will print blank. Any clue why? Using the above code allowed me to retrieve session variables from text fields but when I include arrays, I can't retrieve the info.
$field_qty1 is empty when you're trying to add it to the end of the array. You are adding overhead by using array_push(). You should consider easing your server's load by using:
[stuff that defines $field_qty1] $ordersArray[]=$field_qty1; to add the new value to the end of the array.