what does the assignment in this loop do? I don’t get the array notation in it :S
foreach($fieldvalues as $fieldvalue){
$insertvalues[] = $fieldvalue;
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
$insertvalues[]means insert a new item into the array, its a shortcut of array_push(). Its also preferred as it created lesser overhead whilst the PHP is working.Additional:
For those who are unsure how the loop works.
every time the loop… loops, the value
$fieldvaluebecomes the next value a pointer is looking it in the array$fieldvalues– thus adding this to a new array `$insertvalues by means of the shortcut syntax mentioned above.