Skip to content

Tutorial KartTutorialKart

×
C++ Java PHP Python Kotlin Swift JavaScript Golang
  • PHP Tutorial
  • PHP Tutorial
  • PHP Install
  • PHP Hello World
  • PHP Variables
    • Check if variable is set
  • PHP Echo
  • PHP Datatypes
    • Boolean
    • Integer
    • Type Conversions
      • Convert string to int
      • Convert string to float
      • Convert string to boolean
      • Convert int to string
      • Convert int to float
    • Get type of variable
  • PHP Operators
    • Arithmetic
      • Addition
      • Subtraction
      • Multiplication
      • Division
      • Modulus
      • Exponentiation
    • Assignment
      • Simple Assignment
      • Addition Assignment
      • Subtraction Assignment
      • Multiplication Assignment
      • Division Assignment
      • Modulus Assignment
  • PHP Comments
  • PHP Conditional Statements
    • If
    • If Else
    • ElseIf
    • Switch
    • Python If AND
    • Python If OR
    • Python If NOT
  • PHP Loops
    • While Loop
    • For Loop
    • foreach
    • Nested foreach
  • PHP Functions
    • sizeof()
    • echo() vs print()
    • printf() vs sprintf()
  • 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