include anchor

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
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

include anchor

Post by milleusi »

how to use include() with anchor?

i wish to jump to a specific part of the file ..... eny ideea pls..

thx
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Split the code into seperate files, or functions within the file and call it.
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Post by milleusi »

i wish to make a news page, and all the news be in the same file displayed, but to focus at one.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Wihtout a more descriptive explanation, or your code, it will be difficult to help you :)
User avatar
trukfixer
Forum Contributor
Posts: 174
Joined: Fri May 21, 2004 3:14 pm
Location: Miami, Florida, USA

Post 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
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Post 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
Post Reply