$example_array= array( "green", "red", "green", "blue", "red");
phpで上記のような配列から、重複要素を削除するには
$example_array = array_unique($example_array);
とすることで重複要素は削除されます。
…
この投稿へのコメント
コメントを残す
ピックアップ記事
php 配列の要素から重複を削除し、添え字を再配布する
2009年12月07日
過去Blog
ABPeoplePickerNavigationControllerのキャンセルボタンを無効にし、新規追加ボタンを実装する
2011年01月17日
過去Blog
viewController内に以下のようにインターフェースを宣言します。
@interface ABPeoplePickerNavigationController (Expose)
@property (nonatomic, assign) BOOL allowsCancel;
@property (nonatomic, assign) BOOL allowsCardEditing; @end
同じファイル内に、以下のように設定します。
ABPeoplePickerNavigationController *contactsNavController = [[ABPeoplePickerNavigationController alloc] init];
contactsNavController.tabBarItem.title = @"連絡先";
contactsNavController.allowsCancel = NO;
contactsNavController.allowsCardEditing = YES;
contactsNavController.peoplePickerDelegate=self;
…
objective-C 日時関連
2011年04月28日
過去Blog
http://d.hatena.ne.jp/KishikawaKatsumi/20081121/1227275688
http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
AVIファイルからSWF作成 MotionSWF
2010年10月07日
過去Blog
AVIからSWFファイルに変換する際に便利なソフト
MotionSWF
http://www.vector.co.jp/soft/dl/win95/art/se226046.html vps…
UITableView のcellの複数選択を実装する
2011年01月25日
過去Blog
//セルが選択された際に呼び出される
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//選択されたセルを取得
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
/…
Nice site, nice and easy on the eyes and great content too.
Dear tax exemption, Esq.>
Thank you for your comment.
The thing that this site was read by the foreigner like you is very glad for me.
And, I am very surprised.
Thank you sincerely.