View Single Post
Old 15-12-2007, 09:13   #1 (permalink)
mgpwr
with a hint of lemon
 
mgpwr's Avatar
 
Join Date: Aug 2006
Location: Sheffield
Posts: 519
help with If statement

i use the following to extract a word or two from a text file:

<?
$fp = file('word.txt');
for($i = 0; $i <sizeof($fp);$i++){
echo $fp[$i]. "";
}

?>

How can i get it, using the above and adding more to display depending on the word stored. for example, if the work in the text file is green, then how would i tell to change the colour of the it is in to gree, and if its red to red etc...
__________________
Online portfolio: mgpwr.co.uk
  Reply With Quote