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 use a regular expression to replace a pattern in a string 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 htmlspecialchars function to convert special characters to HTML entities in PHP? Example code:
How can I calculate the sum of an array in PHP? Example code:
How can I use the json_encode function to convert an array or object to a JSON string in PHP? Example code:
How can I use the rename function to rename a file or directory in PHP? Example code:
PHP Use Cases with Example Source Code
How can I shuffle an array in PHP? Example code:
How can I create a file in PHP? Example code:
How can I check if a string ends with a certain substring in PHP? Example code:
How can I use the array_unique function to remove duplicate elements from an array in PHP? Example code:
How can I use the array_rand function to get a random key from an array in PHP? Example code:
How can I generate a random string in PHP? Example code:
How can I format a number with commas in PHP? Example code:
How can I validate a form using PHP? Example code
How can I use a switch statement in PHP? Example code:
How can I read a CSV file in PHP? Example code:
How can I use the array_unshift function to add an element to the beginning of an array in PHP? Example code:
How can I sort an associative array by its keys in PHP? Example code:
How to code in PHP
How can I sort an array in descending order in PHP? Example code:
How can I generate a random number in PHP? Example code
Get User IP Address using PHP – Source Code + Demo
How can I use the file_put_contents function to write a string to a file in PHP? Example code:
How can I use a switch statement with multiple cases in PHP? Example code:
How can I get the current date and time in PHP? Example code:
How can I use the in_array function to check if an element exists in an array in PHP? Example code:
How can I use the array_diff function to get the elements in one array that are not in another array in PHP? Example code:
How can I use the array_pop function to remove the last element from an array in PHP? Example code:
How to send SMS using PHP program (full code sample included)