Ondřej

Author's details

Name: Ondřej Letáček
Date registered: November 25, 2011

Latest posts

  1. PHP Unset ArrayObject in foreach skip the following item – unexpected behaviour — October 27, 2023
  2. Updated script for downloading file from javascript — February 7, 2014

Author's posts listings

Oct 27

PHP Unset ArrayObject in foreach skip the following item – unexpected behaviour

When you unset the item from array in foreach, all works as expected $array = [1,2,3,4]; foreach($array as $key => $value) { if($value === 2) { unset($array[$key]); continue; } echo “$value “; } Will return following: 1 3 4 When you want to do the same with ArrayObject, you would expect exactly the same behaviour. …

Continue reading »

Feb 07

Updated script for downloading file from javascript

I had to use the ajax to download a file internally on our NestForms project. I was searching for a solution and found one on Filamentgroup website. Unforutunatelly, there were some issues that it did not correctly encoded the request. So I had to update the script in order to make it working. See the …

Continue reading »