In this tutorial, we go through tutorials related to date and time in PHP.
- PHP Tutorial
- PHP Tutorial
- PHP Install
- PHP Hello World
- PHP Variables
- PHP Echo
- PHP Datatypes
- PHP Operators
- PHP Comments
- PHP Conditional Statements
- PHP Loops
- PHP Functions
- PHP Strings
-
PHP String Operations
- Basics
- Create a string
- Create empty string
- Compare strings
- Count number of words in string
- Get ASCII value of a character
- Iterate over characters of a string
- Iterate over words of a string
- Print string to console
- String length
- Substring of a string
- Checks
- Check if string is empty
- Check if strings are equal
- Check if strings are equal ignoring case
- Check if string contains specified substring
- Check if string starts with specific substring
- Check if string ends with specific substring
- Check if string starts with specific character
- Check if string starts with http
- Check if string starts with a number
- Check if string starts with an uppercase
- Check if string starts with a lowercase
- Check if string ends with a punctuation
- Check if string ends with forward slash (/) character
- Check if string contains number(s)
- Check if string contains only alphabets
- Check if string contains only numeric digits
- Check if string contains only lowercase
- Check if string contains only uppercase
- Check if string value is a valid number
- Check if string is a float value
- Updates
- Append a string with suffix string
- Prepend a string with prefix string
- Concatenate strings
- Concatenate string and number
- Insert character at specific index in string
- Insert substring at specific index in string
- Repeat string for N times
- Replace substring
- Replace first occurrence
- Replace last occurrence
- Trim spaces from edges of string
- Trim specific characters from edges of the string
- Split
- Split string
- Split string into words
- Split string by comma
- Split string by single space
- Split string by new line
- Split string by any whitespace character
- Split string by one or more whitespace characters
- Split string into substrings of specified length
- Transformations
- Reverse a string
- Convert string to lowercase
- Convert string to uppercase
- Join elements of string array with separator string
- Delete
- Delete first character of string
- Delete last character of string
- Search
- Count number of occurrences of substring in a string
- Count alphabet characters in a string
- Find index of substring in a string
- Find index of last occurrence in a string
- Matchings
- Find all the substrings that match a pattern
- Check if entire string matches a regular expression
- Check if string has a match for regular expression
- Sorting
- Sort array of strings
- Sort strings in array based on length
- Foramatting
- PHP – Format string
- PHP – Variable inside a string
- JSON
- PHP – Parse JSON String
- Conversions
- PHP – Convert CSV String into Array
- PHP – Convert string array to CSV string
- PHP Arrays
-
PHP Array Programs
- Basics
- Introduction to Arrays
- Indexed arrays
- Associative arrays
- 2D arrays
- Multi-dimensional arrays
- String array
- Array length
- Create Arrays
- Create indexed array
- Create associative array
- Create empty array
- Checks
- Check if array is empty
- Check if specific element is present in array.
- Check if two arrays are equal
- Check if any two adjacent values are same
- Read/Access Operations
- Access array elements using index
- Iterate through array using For loop
- Iterate over key-value pairs using foreach
- Array foreach()
- Get first element in array
- Get last element in array
- Get keys of array
- Get index of a key in array
- Find Operations
- Count occurrences of specific value in array
- Find index of value in array
- Find index of last occurrence of value in array
- Operations
- Combine two arrays to create an Associative Array
- Convert array to string
- Convert array to CSV string
- Join array elements
- Reverse an array
- Sort array
- Sort array of strings
- Split array into chunks
- Slice array by index
- Slice array by key
- Preserve keys while slicing array
- Truncate array
- Filtering
- Remove duplicate values in array
- Filter elements in array based on a condition
- Filter positive numbers in array
- Filter negative numbers in array
- Remove empty strings in array
- Delete Operations
- Delete specific value from array
- Delete value at specific index in array
- Remove first value in array
- Remove last value in array
- Exceptions
- Array - Notice: Undefined offset: 0
- JSON
- JSON encode
- Array Functions
- array_chunk()
- array_column()
- array_combine()
- array_change_key_case()
- array_count_values()
- array_diff_assoc()
- array_diff_key()
- array_diff_uassoc()
- array_diff_ukey()
- array_diff()
- array_fill()
- array_fill_keys()
- array_flip()
- array_key_exists()
- array_keys()
- array_pop()
- array_product()
- array_push()
- array_rand()
- array_replace()
- array_sum()
- array_values()
- PHP Classes and Objects
- PHP Exception Handling
- PHP Date and Time