A collection of useful PHP functions that I have created over the years. Feel free to use them in your own projects.
For those who are interested in using CodeIgniter 3.1.13 with HMVC (Hierarchical Model-View-Controller) architecture, I have created a starter pack that you can use to kickstart your project. The starter pack includes the following:
- CodeIgniter 3.1.13
- HMVC (Hierarchical Model-View-Controller) architecture
- Dynamic base URL
- Dynamic Environment and Database Configuration
Converts a number to its Indonesian word representation. For example, 123
becomes seratus dua puluh tiga
.
Converts a date to its Indonesian word representation. For example, 2019-01-01
becomes Selasa, 1 Januari 2019
.
Converts a month to its Indonesian word representation. For example, 01
becomes Januari
.
Checks if a number is a prime number. Returns true
if the number is a prime number, false
otherwise.
Checks if a string is a palindrome. Returns true
if the string is a palindrome, false
otherwise.
Calculates the factorial of a number. For example, 5
becomes 120
.
Reverses a string. For example, Hello World!
becomes !dlroW olleH
.
#F1 - 德瓦亚尔