Home > Code Snippets > Quick Tip

Quick Tip

February 14th, 2007 Leave a comment Go to comments

= explode("\\n",join('',@file("words.txt")));

What does the above code do ?

gets you the words from words.txt, :) if you have one, and strips off the newline character, before assigning each word to array element. otherwise you may need array_walk or foreach to do this..

Categories: Code Snippets Tags:
  1. No comments yet.
  1. No trackbacks yet.

five + five =