Skip to content

Tag: arrays

range of numbers from array

I have an array of sorted numbers, for example: In this case, we have the following ranges of numbers: 1) 33-36 2) 66-69 3) 89-93 I want to create an array for each range: Answer Output:

Determining even/odd using a array_filter

I am digging deeper into the array_filter() of php. I’ve understand the basic idea of it but fall into new problem. $array = [‘a’ => 1, ‘b’ => 2, ‘c’ => 3, ‘d’ => 4, ‘e’ => 5]; $…

PHP – Click button to show array

I pretty new at PHP (also my first question here). I have created a button, when you click on it I want the values in an array to show up on the page. (And would also like the values to show up …