PHP code - what does this part of code mean?
arrays, php
Solution
`$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.
foreach($fieldvalues as $fieldvalue)
every time the loop... loops, the value `$fieldvalue` becomes 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.
Problem
what does the assignment in this loop do? I don't get the array notation in it :S ``` foreach($fieldvalues as $fieldvalue){ $insertvalues[] = $fieldvalue; } ```