As part of a form-validation page I'm writing, I stuck the previously entered form data into the session when an error was encountered so that I can extract said data after redirecting to the form page and place it into the correct form fields. In the past I've always had lines like this:
Code: Select all
$title = $_SESSION['event_details']['title'];
$start_date = $_SESSION['event_details']['start_date'];Code: Select all
list($title, $start_date) = $_SESSION['event_details'];Any ideas on how to do get at those values with list()? If I use print_r() I can display them on the screen, so I know they're in there. Could it be that the array is associative and therefore doesn't have numerical indices? If so, anyone got a good way to convert associative to "normal" arrays or is there a list() construct that works on associative arrays?
Thanks!
-- Dash --