Skip to content
Software
Blog
About
Contact
Search
Menu
Software
Blog
About
Contact
Search
Search
How can I sort an array in PHP? Example code:
Listen
$fruits = array("orange", "apple", "banana"); sort($fruits); print_r($fruits);
How can I loop through an array in PHP? Example code
How can I use the array_keys function to get an array of keys from an associative array in PHP? Example code:
How can I get the current date and time in PHP? Example code:
How can I create a session variable in PHP? Example code
How can I use the filesize function to get the size of a file in PHP? Example code:
How can I use the rename function to rename a file or directory in PHP? Example code:
How can I write to a CSV file in PHP? Example code:
How can I convert a string to uppercase in PHP? Example code:
How can I use a regular expression to replace a pattern in a string in PHP? Example code:
How can I use the array_walk function to apply a function to each element of an array in PHP? Example code:
How can I use the array_slice function to get a portion of an array in PHP? Example code:
How can I replace a substring in a string in PHP? Example code:
How can I sort an associative array by its keys in PHP? Example code:
Get User IP Address using PHP – Source Code + Demo
How can I use the array_intersect function to get the common elements between two or more arrays in PHP? Example code:
How can I check if a string contains a certain substring in PHP? Example code:
How can I validate a form using PHP? Example code
How can I convert a string to lowercase in PHP? Example code:
How can I use the array_filter function to filter an array based on a condition in PHP? Example code:
How can I use the scandir function to get a list of files and directories in a directory in PHP? Example code:
How can I use the array_shift function to remove the first element from an array in PHP? Example code:
PHP Use Cases with Example Source Code
How can I use the array_map function to apply a function to each element of an array in PHP? Example code:
How can I use the json_decode function to convert a JSON string to an array or object in PHP? Example code:
How can I use the array_values function to get an array of values from an associative array in PHP? Example code:
How can I use the glob function to get a list of files that match a pattern in PHP? Example code:
How can I use the array_reduce function to apply a function to each element of an array and reduce it to a single value in PHP? Example code:
How can I use a switch statement with multiple cases in PHP? Example code:
How can I use the explode function to split a string into an array with a limit in PHP? Example code:
How can I use the is_readable function to check if a file is readable in PHP? Example code: