By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,347 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,347 IT Pros & Developers. It's quick & easy.

problem in the array

P: 4
my array contains:
Expand|Select|Wrap|Line Numbers
  1. $arr1=Array ( [] => 2 [complaint] => 1 [question] => 1 [you've] => 1 [landed] => 1 [right] => 1 [place] => 1 );
  2.  
in the above array if array key is empty ie. [] without value then
i have to delete that key and value from that array and store that result in another array which contains array which is having keys without null or not given keys.
Aug 25 '08 #1
Share this Question
Share on Google+
3 Replies


Atli
Expert 5K+
P: 5,058
Hi. Welcome to bytes!

I saw neither a question nor a problem description in you post.
(See the Posting Guidelines before posting please.)

But, I would advice you to take a look at the foreach loop, as well as the empty function.

If that is not what you are after, please explain your question in detail.
Aug 25 '08 #2

P: 4
Hi. Welcome to bytes!

I saw neither a question nor a problem description in you post.
(See the Posting Guidelines before posting please.)

But, I would advice you to take a look at the foreach loop, as well as the empty function.

If that is not what you are after, please explain your question in detail.

my question is:
how to exclude the single characters in array
i.e in my application the user gives the input as text area what ever the text he is giving in text area that i'm splitting into separate words and storing in array and the words which contains sinlge alphabetical characters i have to delete in array store in seperate array
pls help regarding this
Aug 25 '08 #3

Atli
Expert 5K+
P: 5,058
Ok.

You could use a foreach loop, and the strlen function to check the size of the given element.
When a element with a given length (1) is found, you could simply unset that element.
Aug 25 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.