Dynamic Array Data Structure in PHP

When talking about array data structure in general (not in PHP), we know that arrays can hold any data type as value are fixed in size (have fixed capacity) have random access (can get or set items using indexes in constant time O(1)) In PHP, arrays are mighty dynamic by default, but in our previous … Read more

Fixed Array Data Structure in PHP

When talking about Array as a data structure in general (not in PHP), we know that arrays: can contain any type of data have a fixed size (they can’t grow) have random access, meaning we use indexes to access any element at constant time O(1), which is really fast Typical operations which can be done … Read more

Round a decimal number using Modulo operator

If you ever need to round a number, you can easily do that by using a Modulo operator. Modulo operator returns a remainder after division of one number with another. So, if we do a modulo operation of some decimal number with a number 1, we will get a remainder after the decimal point (dot … Read more

Apache 2.4 and Command Line in Windows 10

If you run Apache 2.4 server on your Windows 10 development machine, you might be interested in several command line commands that you can use with Apache server (httpd.exe). To run the commands we need to have CMD with administrative privileges. Next, change directory to c:\Apache24\bin using the command cd c:\Apache24\bin To see all available … Read more

PHP skripta za korištenje MAC Address Lookup API-a (XML verzija resursa).

U nastavku je mala PHP skripta za korištenje API-a koji omogućuje traženje proizvođača vezanog za pojedinu MAC adresu. Besplatan API koji koristim dostupan je na adresi: http://www.macvendorlookup.com/api. Prije početka rada morate se registrirati na toj stranici kako biste dobili svoj API key. U kodu sam izostavio moj API key, pa morate unijeti svoj kako bi … Read more