0

here I share my old code need with each function so now I got this kind of error

each() function is deprecated

my code is

list($k, $v) = each($files);
jps
  • 20,041
  • 15
  • 75
  • 79
Jay Parmar
  • 111
  • 4

1 Answers1

1

You can use foreach statement like :

<?php

foreach($files as $k => $v) {
    // Do some stuffs
}

Foreach works since PHP 4.

GregThB
  • 283
  • 1
  • 7
  • how can i change this each function in new PHP code $('.selected', window.parent.document).each(function () { – Jay Parmar Jul 22 '22 at 08:50