Thanks,

I ended up trying a few things and ended up with:

if (empty($value['year_id'])) 
{
        unset($this->data['ProfilesSkill'][$key]);
} 

Which does what I need.

Now step away from the computer and enjoy Christmas with your friends an
family!

Have a good holiday everyone.

Dave

-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of kangur91
Sent: December-25-09 6:39 PM
To: CakePHP
Subject: Re: Array Help

If you want to remove key from array, it's simple unset(example
below):

foreach($array as $key => $value) {
if($value == "" || $value == " " || is_null($value)) { unset($array[$key]);

You can add if($value != null)

use array_reserve function.

I wish, I help you.

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com To
unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group 
cake-php+at http://groups.google.com/group/cake-php?hl=en
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.722 / Virus Database: 270.14.114/2575 - Release Date: 12/25/09
06:03:00

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to