473,386 Members | 1,785 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,386 software developers and data experts.

How to include only a few rows from a file

3
Hello,
I have a file with links in 3 categories.

<a href=# id="cat1">Link1</a>
<a href=# id="cat1">Link2</a>
<a href=# id="cat2">Link3</a>
<a href=# id="cat1">Link4</a>
<a href=# id="cat3">Link5</a>
<a href=# id="cat2">Link6</a>
<a href=# id="cat3">Link7</a>
<a href=# id="cat1">Link8</a>

And I want to display only the last 3 links from a category on my hopepage
In other page I want to display all the links form one of the categories
And in third page I want to display all links.

For the third thing I will use simple include function
but I don't know how to make the other 2 things. It is important to me to make that because I want this list to be easy updateable.
Thanks
Aug 25 '10 #1
3 1208
m1t3
3
I just want to add that this is like news.
I have news in different categories and I want to display the last 3 from a category and i want to display last 10 from all categories.
And the way I want to do it is to add links in a file.
Thanks
Aug 25 '10 #2
JKing
1,206 Expert 1GB
Are you storing the news in a database?

If so, I would just store the link in the database.

Then you can pull your news data by category along with the link.
Aug 25 '10 #3
m1t3
3
I want to make it with one single file
and the news won't be in my website. That would be only links
Thanks
Aug 25 '10 #4

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

Similar topics

1
by: Dennis T. Holm | last post by:
Hey I wonder how i can include a file from another directory.... is this possible ? include('/directory/file.php'); Dennis T. Holm
3
by: john | last post by:
Hello all, I am wondering what the best way to: Include a file (html and/or text) into my php application, that is not on the webserver, is. For example, when the user visits the intranet site,...
5
by: cooldv | last post by:
i have many *.html* pages with the same header. i wanted to make one *header* file and put a link to that file in all html pages. So if i ever need to make changes in the header, i will need to...
1
by: Fabrice | last post by:
Hi, Is it possible to include a file in a web application which is outside the web path (without virtual directory). Language is ASP with IIS6. for example : physical web path application:...
4
by: FrzzMan | last post by:
The subject may sound a lil dumb :D But my problem is: When my app run, it'll check if a specific file existed or not, if existed it's OK, if not it will create default file. I want to...
2
by: Susan Baker | last post by:
Hi, I am (trying) to compile some code I downloaded from the internet. The sources contain references to header files - using the form : #include <pathname/file> If I change the form to...
9
by: chat | last post by:
Hi, every body. I have 3 files like this: -------------------------------------------------------- file name : header.h #ifndef TEST_H #define TEST_H int a=1; double b=0.5;
9
by: Daz | last post by:
Hi everyone. I am a little stumped at why when I try to include a file in same directory as the script being processed, it looks in the same directory as the script that included it to begin...
8
by: WBSKI | last post by:
Can I include a file as a variable without it showing on the page? What I want to do: Include an HTML file and adjust the links to make it work from a different folder. $begin = "path to...
3
by: mishrarajesh44 | last post by:
hii all, is it not possible to include a file which is outside the folder which contains the script file(where include( ) is used). my problem is: the file add.php uses the ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.