Remove empty elements from an Array using PHP

Last updated on May 23rd, 2016 at 04:44 pmClick to rate this tutorial! [Total: 1 Average: 4]Remove empty elements from an Array using PHP In the variable data array I have given 8 data elements. Let $a, $b, $c, $d,$e contains data and others that is $f, $g, $h are empty so we will get […]

File System Reference In PHP

Click to rate this tutorial! [Total: 1 Average: 5]The unlink() function deletes a file. This function returns TRUE on success, or FALSE on failure. Syntax unlink(filename,context) Parameter Description filename Required. Specifies the file to delete Example <?php $file = “newfile.txt”; if (!unlink($file)) { echo (“Error deleting $file”); } else { echo (“Deleted $file”); } ?> […]

Sort MYSQL data by date

Last updated on April 26th, 2016 at 10:21 pmClick to rate this tutorial! [Total: 1 Average: 5]Sort MYSQL data by date, If you have a field inside mysql for DATE and you need to sort the data accordingly in ascending or descending order you can use this UNIX_TIMESTAMP(FIELD NAME). You can even update your existing […]

Find the string and then the line number using php from text file

Click to rate this tutorial! [Total: 1 Average: 5]Find the string and then the line number using php from text file or a text data base. In this we are searching a string named alan inside one of our log files. Click to rate this tutorial! [Total: 1 Average: 5]