Fatal Error: syntax error, unexpected 'foreach' (T_FOREACH)