Page 1 of 1
include anchor
Posted: Wed Nov 23, 2005 5:54 am
by milleusi
how to use include() with anchor?
i wish to jump to a specific part of the file ..... eny ideea pls..
thx
Posted: Wed Nov 23, 2005 5:56 am
by Jenk
Split the code into seperate files, or functions within the file and call it.
Posted: Wed Nov 23, 2005 6:04 am
by milleusi
i wish to make a news page, and all the news be in the same file displayed, but to focus at one.
Posted: Wed Nov 23, 2005 7:34 am
by Jenk
Wihtout a more descriptive explanation, or your code, it will be difficult to help you

Posted: Wed Nov 23, 2005 7:47 am
by trukfixer
sounds like he wants to use the <a anchor='name'> and <a href='#anchor_name'> tags in html these arent part of php, nor used in include()

I suggest reading about it at
http://www.w3c.org
Posted: Wed Nov 23, 2005 7:56 am
by Jenk
That is what I suspected, but thought that maybe milleusi wanted to redirect to an anchor, or at first that he/she wanted to include a PHP file but only execute a segment of it.
And I was trying to drop the hint that the more help you give us to understand the problem, the more help we can give to solve it, but posting short, sharp and sweet answer :p
Posted: Wed Nov 23, 2005 8:00 am
by milleusi
i have the following code:
index.php
Code: Select all
<?php
....
$show = $_REQUEST['cathegory'];
include('detect.php');
...
?>
detect.php
Code: Select all
<?
switch($cathegory){
case 'news':
//link to the specific information
include('all_news.php#5'); // i get an error at this kind of line,
break;
....
}
?>
thx