Click here to Skip to main content
15,879,613 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionHow to make a binary tree structure in php Pin
amanarora3-Dec-10 18:43
amanarora3-Dec-10 18:43 
AnswerRe: How to make a binary tree structure in php Pin
Dr.Walt Fair, PE12-Dec-10 12:31
professionalDr.Walt Fair, PE12-Dec-10 12:31 
GeneralRe: How to make a binary tree structure in php Pin
amanarora12-Dec-10 20:28
amanarora12-Dec-10 20:28 
QuestionNot able to debug my application Pin
PeriyasamyRamachandran3-Dec-10 3:37
PeriyasamyRamachandran3-Dec-10 3:37 
QuestionNot able to log in - Fatal error [modified] Pin
PeriyasamyRamachandran2-Dec-10 22:25
PeriyasamyRamachandran2-Dec-10 22:25 
QuestionUsing Perl to automate the software installation build process Pin
Blair Symes2-Dec-10 6:34
Blair Symes2-Dec-10 6:34 
Questionbreadcrumbs Pin
AndyInUK29-Nov-10 23:21
AndyInUK29-Nov-10 23:21 
AnswerRe: breadcrumbs Pin
cjoki30-Nov-10 6:26
cjoki30-Nov-10 6:26 
I have used a mapping table with a structure like so
id   page     parent
1    index    0
2    about    1
3    products 1
4    cars     3
5    trucks   3

and so on...

I can then code some logic to build a breadcrumb dynamically based on the page name I am on.
Simply reference the parent until you get to a 0 with a 0 representing the top level menu.

so for example if someone is on page trucks the code will step over the rows in this order

5 trucks
3 products
1 index

build this in a string using a left to right order
first pass:
$bc = "/"."trucks";

second pass:
$bc = "/"."products".$bc;

third pass:
$bc = "/"."index".$bc;


of course you will want to add links instead of plain text.

You can also pregenerate the breadcrums and store those if your site is not very dynamic and you have control over the input of new pages.

Hope that helps.
Chris J
GeneralRe: breadcrumbs Pin
AndyInUK1-Dec-10 5:48
AndyInUK1-Dec-10 5:48 
GeneralRe: breadcrumbs Pin
Luc Pattyn1-Dec-10 6:15
sitebuilderLuc Pattyn1-Dec-10 6:15 
GeneralRe: breadcrumbs [modified] Pin
cjoki2-Dec-10 6:29
cjoki2-Dec-10 6:29 
AnswerRe: breadcrumbs Pin
Christian Mattix18-Jan-11 9:27
Christian Mattix18-Jan-11 9:27 
Questionis (mySQL)INSERT function limited in the number of Variables and Values? Pin
bijan.8k24-Nov-10 9:40
bijan.8k24-Nov-10 9:40 
AnswerRe: is (mySQL)INSERT function limited in the number of Variables and Values? Pin
Luc Pattyn24-Nov-10 10:13
sitebuilderLuc Pattyn24-Nov-10 10:13 
AnswerRe: is (mySQL)INSERT function limited in the number of Variables and Values? Pin
cjoki24-Nov-10 11:07
cjoki24-Nov-10 11:07 
QuestionHow to iterate form-fields on a page and send them to database? [modified] Pin
jasonmp20-Nov-10 16:26
jasonmp20-Nov-10 16:26 
AnswerRe: How to iterate form-fields on a page and send them to database? Pin
cjoki22-Nov-10 4:49
cjoki22-Nov-10 4:49 
QuestionHow to GET embedded video by using an URL which has embedded video? Pin
nicholasng20-Nov-10 15:40
nicholasng20-Nov-10 15:40 
Questionhow to implement indian payment gateway Pin
pallavi shrivastava16-Nov-10 18:29
pallavi shrivastava16-Nov-10 18:29 
QuestionRe: how to implement indian payment gateway Pin
Gerben Jongerius16-Nov-10 20:23
Gerben Jongerius16-Nov-10 20:23 
QuestionHow to convert php script to .exe Pin
udch12-Nov-10 23:54
udch12-Nov-10 23:54 
AnswerRe: How to convert php script to .exe Pin
cjoki15-Nov-10 4:37
cjoki15-Nov-10 4:37 
AnswerRe: How to convert php script to .exe Pin
Mohamed7IBrahim18-Nov-10 3:21
Mohamed7IBrahim18-Nov-10 3:21 
GeneralRe: How to convert php script to .exe Pin
cjoki18-Nov-10 5:27
cjoki18-Nov-10 5:27 
AnswerRe: How to convert php script to .exe [modified] Pin
DaveX8622-Nov-10 7:32
DaveX8622-Nov-10 7:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.