I think the easiest way is to make an assiciative array of all lines in the file. First you have to get the files in a variable, file_get_conten ts() is usefull for this. Then use a regular expression function to get all lines in an array, preg_match_all for instance.
$line [1995] [1] = (8 June 1995) S v m [tty]xs a; 1995 (3) SA otyttt
$line [1995] [2] = (8 June 1995) S v m [tty]xs a; 1995 (3) SA otyttt
......
User Profile
Collapse
-
Ok, I was one google search away from my answer :)
SQL Server Hosting Toolkit
Edit: It's really a great tool!Leave a comment:
-
Migrating database from development server to hosted server
Hello,
I have created a database on my home development server (Microsoft SQL Server 2005 Express). Now I finally found a hoster that fits my needs and I would like to migrate my database to this hosted SQL Server.
The database contains:
- Tables
- Data inside tables
- Views
- Stored procedures
I can connect to this server remotely. However I don't have file access so I can't just restore... -
[code=php]
echo $var; // Results in the value of $var being printed
echo '$var'; // Results in the word '$var'
echo "$var"; // Results in the value of $var being printed
[/code]
Source
With doubles quotes (") you can print things like:
[code=php]
$name = 'spudse';
echo "My name is $name";
[/code]
With single quotes you need to do...Leave a comment:
-
A small database would be perfect for this. SQLite comes with PHP5 and is quite easy to work with and quick to setup.
Are you experienced with databases? If not, it's not as hard as it seems.Leave a comment:
-
You can use the header function for this. No output may be sent before using this function.
[code=php]<?php
header('Locatio n: http://www.yourdomain. com/page.asp');
?> [/code]Leave a comment:
-
I already found this article: Get the correct time by converting between time zones with PHP and PEAR, but it makes use of PEAR and I rather not use pear.
Does anybody know a pure php solution?Leave a comment:
-
The name of the windows is only available client-side I suppose. PHP can't communicate with a client-side language like Javascript (well it could when you use ajax, but I don't think that is what you are looking for).
What you could do is add the window name to the url that is used by this window, for instance "http://www.yourdomain. com/window.php?name =theName".
You can know access this name with:
[code=php]echo...Leave a comment:
-
Jpgraph is indeed created just to do this. The script you pasted is a Jpgraph script also.
Jpgraph is a sort of script/library that uses GD library (needs to be installed in php) to create graphs. It comes with a massive load of examples, which you can alter to create into something you like.Leave a comment:
-
You can leave the isset() criteria out, just start every page with
[code=php] session_start() ; [/code]
You have to make sure that you that there is no character or space or anything outputted before you use the session_start() function (this will output an error also, about output before the headers have been send).
Also make sure that your browser accepts cookies (sessions are actually cookies until you...Leave a comment:
-
Working with time zones in php
I am creating a PHP web application where users can see which events have occured between two input dates. These events and their datetime are stored in a database in UTC timezone.
The user is able to select the time zone he is in and then the start date en end date. The PHP script then selects all events date occured between those dates.
The date values submitted by user are:
01-01-2008 00:00
05-01-2008...
No activity results to display
Show More
Leave a comment: