there is an array

$arr = array( '320', '256', '192', '160', '128', '64', '32', ); 

and the variable $b = '192'; (the value is always different) so, how to remove keys from the array up to 192, in this case 320 and 256

  • And how did you try to solve this problem? - user207618
  • one
    repl.it/DAU0/1 - user207618

1 answer 1

With the help of array_search() we find the index of the element, with the help of array_splice() delete the elements.

  • array_slice what I need - Solo_777