PHP read file line by line to an array

How can you read file, like text file line by line and get contents to and array using php? This can be using “FILE_IGNORE_NEW_LINES”.Here is a tested example to read text file line by …

PHP array convert to Java Script array

Sometimes when we using php, we want to convert php array to java script array.php array can be convert to java script easily.Here is a easy and best methods to do this. PHP provides json_encode() …