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

Data structure in php

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
8 1879
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dmb000006 | last post by:
Hello, I have a database style data structure, each record has several fields. I would like to create a nested data structure that would let me 'query' the data on the value of certain...
3
by: Mike Jones | last post by:
need help with data structures.Looking for ways to start, sample code, anything Program description: Design and implement a Visual C++ .NET program that inserts values into a data...
2
by: yee young han | last post by:
I need a fast data structure and algorithm like below condition. (1) this data structure contain only 10,000 data entry. (2) data structure's one entry is like below typedef struct _DataEntry_...
11
by: theshowmecanuck | last post by:
As a matter of academic interest only, is there a way to programmatically list the 'c' data types? I am not looking for detail, just if it is possible, and what function could be used to...
5
by: Alfonso Morra | last post by:
Hi, I am writing a messaging library which will allow me to send a generic message structure with custom "payloads". In many cases, a message must store a non-linear data structure (i.e....
3
by: Kiran B. | last post by:
Hi, I am new to .net. I have two Data Structure Type ... Sturcture A and Structure B. Structure A Public Fname as String Public LastName as String Public City as String Public Zip as String...
11
by: Macca | last post by:
Hi, I'm writing an application that will pass a large amount of data between classes/functions. In C++ it was more efficient to send a pointer to the object, e.g structure rather than passing...
3
by: aurora | last post by:
This is an entry I just added to ASPN. It is a somewhat novel technique I have employed quite successfully in my code. I repost it here for more explosure and discussions. ...
29
by: zoltan | last post by:
Hi, The scenario is like this : struct ns_rr { const u_char* rdata; }; The rdata field contains some fields such as :
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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.