I have a txt file that created in notepad , containing these lines for example :
lao_esan_ubon_444
chantrick
solikh
knalpoot
tanduy_007
Mario3010
Now i need to put every line in an array cell , like these:
array('lao_esan_ubon_444','chantrick','solikh','knalpoot','tanduy_007','Mario3010');
How can i do this with PHP (for long lists)?
Use the
filefunction.Note that the
flagsparameter (FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) is only available in PHP 5 or greater.