By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Data structure in php

P: n/a
and
How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.
Jan 1 '08 #1
Share this Question
Share on Google+
8 Replies


P: n/a
and schrieb:
How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.
Since PHP5 uses references, you can implement it just like you would do
in in Java, e.g.
Jan 1 '08 #2

P: n/a
On 1 Jan, 13:26, and <andreaesposit...@gmail.comwrote:
How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.
Why do you think its different in PHP than in other languages?

C.
Jan 1 '08 #3

P: n/a
and
On 1 Gen, 18:07, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.comwrote:
On 1 Jan, 13:26, and <andreaesposit...@gmail.comwrote:
How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.

Why do you think its different in PHP than in other languages?

C.
Does exist pointers in php?
Jan 1 '08 #4

P: n/a
and
On 1 Gen, 14:49, Jonas Werres <jo...@example.orgwrote:
and schrieb:
How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.

Since PHP5 uses references, you can implement it just like you would do
in in Java, e.g.
Are you talking about object oriented programming?
Jan 1 '08 #5

P: n/a
and wrote:
On 1 Gen, 14:49, Jonas Werres <jo...@example.orgwrote:
>and schrieb:
>>How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.
Since PHP5 uses references, you can implement it just like you would do
in in Java, e.g.

Are you talking about object oriented programming?
No, OO and references are not related. You can have one without the other.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 1 '08 #6

P: n/a
and wrote:
On 1 Gen, 18:07, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.comwrote:
>On 1 Jan, 13:26, and <andreaesposit...@gmail.comwrote:
>>How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.
Why do you think its different in PHP than in other languages?

C.

Does exist pointers in php?
No, PHP doesn't have pointers - like many languages. But you don't
need pointers to implement trees and graphs.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 1 '08 #7

P: n/a
Are you talking about object oriented programming?

Sure.

class LinearList
{
private $next;
private $content;

public getNext()
{
return $this->next;
}

public next(LinearList $next)
{
$this->next=$next;
}

public __toString()
{
return $this->content;
}
....
}
Jan 2 '08 #8

P: n/a
On 1 Jan, 19:15, Jerry Stuckle <jstuck...@attglobal.netwrote:
and wrote:
On 1 Gen, 18:07, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.comwrote:
On 1 Jan, 13:26, and <andreaesposit...@gmail.comwrote:
>How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.
Why do you think its different in PHP than in other languages?
C.
Does exist pointers in php?

No, PHP doesn't have pointers - like many languages. But you don't
need pointers to implement trees and graphs.

--
PHP has references (which can be used to seperate data from navigation/
indexing methods - but they are *not* pointers)

C.
Jan 7 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.