![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outputting formatted Result log file from old 30000 lines result log<help required> | vikas.iet | Shell Programming and Scripting | 5 | 12-02-2007 10:43 PM |
| Problem with outputting multiple lines | lweegp | Shell Programming and Scripting | 6 | 09-22-2006 01:04 PM |
| deleting a varying amount of lines from a list of files | benair | Shell Programming and Scripting | 4 | 04-14-2006 01:48 PM |
| need help appending lines/combining lines within a file... | mr_manny | Shell Programming and Scripting | 2 | 01-06-2006 06:45 PM |
| sed not outputting last line of input file | 2reperry | Shell Programming and Scripting | 3 | 12-16-2005 12:51 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
PHP Output specified amount of lines from a file
Hi, I have the code below which outputs all the lines of a CSV file but I'd like it to only output 15 lines then save the current line as a variable which could be used (as a link) to display the next 15 lines. I can't get my head around the logic! Please help
while ($data = fgetcsv($fp, 1000, "~")){ $num = count ($data); $i++; print '<td>'; print "<a href=\"" . $data[2] ."\"><img src=\"" . $data[2] . "\"></a><br>"; print "Submitted by:<br>"; print $data[1]; print '</td>'; if ($i == 5){ print '</tr>'; $i=0; } } print '</table>'; fclose ($fp); Many thanks, ![]() Last edited by pondlife; 10-11-2005 at 11:44 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|