How to get information using php on a row

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aka.snowball
Forum Newbie
Posts: 5
Joined: Tue Jun 22, 2010 6:38 am

How to get information using php on a row

Post by aka.snowball »

Wow thanks.

So say that I want a ceartain number, etc 237 on linenumber 2 on the following line

Code: Select all

 <tr><td>237</td>
in html file located in example folder "testRuns\testRun45\Sumary.html". How do I get it using php? im only interested in the number, not the html code :)

Say also that you have other testruns contanined in other folders, for example

"testRuns\testRun46\Sumary.html" and "testRuns\testRun47\Sumary.html" etc. and also each testrun folder are containing an index.shtml

for example "testRuns\testRun46\index.shtml" and "testRuns\testRun47\index.shtml"

I want the overview.shtml to read the numbers from the summary.html file as the index.shtml is contained in.

So for example

If "testRuns/testRun46/index.shtml" does the following

Code: Select all

"<!--#include file="testruns\include\overview.shtml" --> "

I want the "testruns\include\overview.shtml" to use the "testRuns/testRun46/summary.html" as a source file.


Im new at php as you might notice, but I hope somebody out there has a clue of what im talking about and can get me in the right direction :)
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: How to get information using php on a row

Post by Jade »

So say that I want a ceartain number, etc 237 on linenumber 2 on the following line

Code: Select all

 <tr><td>237</td>
You need to parse the file in order to find whatever it is you're looking for. There are a lot of different file system functions to do this: http://www.php.net/manual/en/ref.filesystem.php

I'm not exactly sure what you're trying to do with the other part of your post but, if i understand correctly, you essentially want to be able to look at the contents of files from other directories like this: http://design1online.com/examples/lesso ... source.php. All the code for my view source utility is available if you click on the different file names.
Post Reply