[PHP] How to get longest string from array ?

Hope it will save your time. Sometimes in PHP we may need to find the longest string from an array. So you can get this solutions in google but I made a function to make it more usable. It will return maximum lenght, key and the string form that array.

Clieck Here to see the code

Don’t forget to share!.



About Tanveer
RIA (Rich Internet Application) Developer with a wide variety of business applications. Particularly interested in client/server and relational database design. Always interested in migration projects, as well as close interaction with the DB manufacturers.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: