Frieling
-
Posts
28 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Frieling
-
-
can you give me an example of where i would use it at?
-
Alright, I am trying to create a code to scan all text files in a directory, then each line in the text files have sections seperated by a "|". I need to insert each section in a line into an array, but i am totally stumpt. This is what i have:
<?php $path = './';$findThisString = '|';$dir = dir($path);// Get next file/dir name in directorywhile (false !== ($file = $dir->read())){ if ($file != '.' && $file != '..') { // Is this entry a file or directory? if (is_file($path . '/' . $file)) { // Its a file, yay! Lets get the file's contents $data = file_get_contents($path . '/' . $file); // Is the str in the data (case-insensitive search) if (stripos($data, $findThisString) !== false) { $file2 = fopen($file, "r"); while (!feof($file2)) { $results = explode("|",fgets($file2)); } fclose($file2); for($i = 0; $i < count($results); $i++) { echo $results[$i]; unset($results[$i]); } } } }}$dir->close();?>
Any ideas?
Displaying seperate div
in JavaScript
Posted · Edited by frieling
Well I am building this tool for the clan I am in to keep track of each member. I decided to do a 2 panel layout. Far left panel, is the navigation(Add soldier, Modify soldier). and the right panel is where you can add the soldier form, and modify the soldier form. But I am having troubles getting the div to display. They are all located inside divs like so(index.php):
And then here is what it looks like: