Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Matthew Carter Newsgroups: comp.lang.php Subject: Re: sql how capture on the fly the row's id when is updated Date: Sat, 01 Aug 2015 21:38:03 -0400 Organization: Ahungry (http://ahungry.com) Lines: 29 Message-ID: <871tfmo4g4.fsf@ahungry.com> References: <87a8uaokt1.fsf@ahungry.com> <87614yojhm.fsf@ahungry.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="7c986cd4736462de309a749b207746fe"; logging-data="3912"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/aOKemI1Qcm8Yo6LU8mtwk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:EjqHFx7ehHJ1SDur03awKHorFoA= sha1:FEeAQLSIVGKcQmdjTgPA350EyKE= Xref: csiph.com comp.lang.php:15625 alex writes: > ok your solution is ok thanks > array first > array after > difference > > I must to test > I noticed that is used the 'use' function (php 5.3) > is there a solution for old php 5.2.x > > Instead of the array_filter, you can write a comparatively similar implementation with a foreach loop. ... foreach ($rows as $row) { if ($row['id'] !== $original_rows[$c++]['id']) { $modified_rows[] = $row; } } ... -- Matthew Carter (m@ahungry.com) http://ahungry.com