I'm modifying a web form, this is the array syntax it currently uses:
$fields = array();
$fields{"name"} = "Name";
$fields{"title"} = "Title";
$fields{"email"} = "Email";
$fields{"prefer_phone"} = "Prefer phone";
$fields{"prefer_email"} = "Prefer email";
$fields{"message"} = "Message";
$fields{"referral"} = "Referral";
The values on the left are from the webform, on the right is what displays in the email.
I'm not too familiar with php but I've not seen an array setup like this in other languages.. (where are the array[5], etc.?)
I need to add another variable into the array. The new variable is from earlier in the script so it won't have the $fields{} syntax I assume.
I can't find documentation of this type of syntax for PHP arrays -- help? How do I add another value into here.. something like:
{$phone} = "Phone";