2 arrays with simple xml post string failing

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Tue Apr 29, 2014 10:23 pm

you start running into syntax errors around this line:
$value = '&'
That is probably the one the error is about. Whenever you see 'unexpected ________' that usually means you've either forgotten a semicolon like this one, or you've improperly terminated a string or left it open.
Then there are more issues below
$result = array_merge($query_vals, $current_user_info); {
it shouldn't end with a brace like that. Your next line starts a foreach loop, and that one should end with a brace but it doesn't, nor does the foreach that starts immediately after it. You're on the right track.

I didn't throw it into an editor or anything just eyeballed it in notepad and those were the ones that jumped out at me. If you use an intelligent IDE, it should help you avoid some of those with syntax highlighting and autocompletion. I personally like Aptana Studio 3, Netbeans, and even notepad++ in that order, but they each have their own strengths and weaknesses.

Post Reply