Thread: Organize Fopen
View Single Post
Organize Fopen
Old
  (#1)
Ancient
PodBot MM's Laziest Waypointer
 
Ancient's Avatar
 
Status: Offline
Posts: 1,010
Join Date: Jan 2005
Location: Nebraska, United States of America
Default Organize Fopen - 21-08-2008

PHP Code:
$filename "news.txt";
$fp fopen($filename"r");
$contents fread($fpfilesize($filename));
$newsTable explode("|NEWS|"$contents);
for(
$i 0count($newsTable) > $i$i++)
 {
  
$newsTable[$i] = explode("|~|"$newsTable[$i]);
 }
print_r($newsTable); 
Array it makes:
$newsTable[0][0]
$newsTable[0][1]
$newsTable[0][2]
$newsTable[0][3]
$newsTable[0][4]

I want it to make:
$newsTable[0][0]
$newsTable[0][1]
$newsTable[1][0]
$newsTable[1][1]

I'm so frustrated right now. I went through several kinds of file opening techniques and I'm just frustrated right now. Can anyone help me with this?


[Web Designer][Waypointer][Gamer]
CFE Games Administrator
[CFE]Games.com
[Never Trust the Untrusted]
  
Reply With Quote