Notes on Java, Solaris, PHP, LDAP…

November 17, 2007

Using PHP array_merge with HTML inputs

Filed under: Uncategorized — negev @ 3:17 pm
Tags:

21 Feb 07
Be careful when using PHP array_merge(..) on arrays with mixed string/numerical keys. Calling array_merge( array(‘string’ => whatever ), array_with_only_numeric_keys) will re-index numeric keys of the 2nd array to start at 0!
e.g. array_merge( array(NO_PREFERENCE => NO_PREFERENCE), $given_hash );

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: