473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

fopen in html table

<?php

$f=fopen("C:\Program Files\Apache Group\Apache2\htdocs\file.txt","r");
$str=fgets($f);

echo "<table border=2 width=800 bordercolor=green>

<tr>

<td>NO</td>

<td> User </td>

<td>Pass</td>

<td>Name</td>

<td>Lname</td>

<td>Birthday</td>

</tr>



<tr>

<td>001</td>

<td colspan=4 width=800 >&nbsp;$str</td>



</tr>

<tr>

<td>001</td>

<td colspan=4>&nbsp;$str</td>



</tr> <tr>

<td>001</td>

<td colspan=4>&nbsp;$str</td>



</tr> <tr>

<td>001</td>

<td colspan=4>&nbsp;$str</td>



</tr> <tr>

<td>001</td>

<td colspan=4>&nbsp;$str</td>



</tr>
</table>";

if i have such code in php and i want to read a new line from a file and print it in next line of table what i have to do

the txt file include this lines:
romik:rrr:Romik:Papelyan:1985-01-21
ara ght:Ara:Gabrielyan:1986-04-02:
meghedi:mmm:Meghedi:Patatanyan:1977-12-16:
marlen:july:Marlen:avudyan:1980-09-07:
krikor:varsa:Krikor:Gafalyan:1987-09-08:
Vahe:mode:Vahe:Nersisyan:1975-10-02:


i colspan the rows but it's better to have a single column for each value
please help me with this
Nov 11 '06 #1
1 1797
ronverdonk
4,258 Expert 4TB
This is your 14th post in this forum, so you know the rules by now:

Read the Posting Guidelines at the top of this forum!! And apply the part that talks about enclosing code within TAGS to your code shown!

This is also a continuation or a double posting of another thread you started but did not close or end-reply to, i.e. http://www.thescripts.com/forum/thread560838.html . What are you doing about that one?

Ronald :cool:
Nov 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: flupke | last post by:
Hi, i have a piece of code that reads a csv list. For instance: 1,index.html 2,linux.html I read these in an array and then i want to use the filename (2nd array element) to make a file and...
11
by: Tesla | last post by:
hey guys, i use Fopen to get the contents from a web page, but I get this error... Warning: fopen(http://seb.sleepbot.com:8000/played.html): failed to open stream: HTTP request failed! ICY 400...
3
by: Jonah | last post by:
Hi I've run some tests and I have to conclude that mysql and fopen doesn't work when you call it in this way. I don't understand why, it's got to be either one of 2 things: a) this just can't...
1
by: bissatch | last post by:
Hi, I am currently working on a content management system where a user can fill in a form (title, keywords, link text etc. - all the initial attibutes), which when submitted, will go onto create...
13
by: Blue | last post by:
Hi , Can any one please let me explain me the diffrences between "open"/ "fopen" or "read"/"fread" or "write/fwrite". I know that "open" /"read" / "write" are system calls and "fopen"...
3
by: Michael | last post by:
I'm having trouble opening a file for writing under Red Hat Fedora Linux. Here is the statement: $fp = fopen("/var/www/html/test01.txt","w"); It generates the following error msg: ...
6
by: rfhurley | last post by:
I'm a newbie at this... I'm trying to run a PHP script from the W3C PHP tutorial, and the example shows the following code: <html> <body> <?php $file=fopen("welcome.txt","r"); ?>
3
by: siyaverma | last post by:
i am trying to upload csv file from user's computer to main server the code i am using is if(((isset($_GET)) && ($_GET=="yes")) ) { $typefield = $_GET; echo...
15
by: joker197cinque | last post by:
I'm trying to fopen a file this way: $handle = fopen("http://localhost/test.html", "r"); but tha page remains "loading .." for 30 seconds and then goes in timeout. However I can open that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.