Data structure in php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • and

    #1

    Data structure in php

    How can i implement data structure like trees and graphs in php-cli?
    Who knows where i can find tutorials?Thank You.
  • Jonas Werres

    #2
    Re: Data structure in php

    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.

    Comment

    • C. (http://symcbean.blogspot.com/)

      #3
      Re: Data structure in php

      On 1 Jan, 13:26, and <andreaesposit. ..@gmail.comwro te:
      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.

      Comment

      • and

        #4
        Re: Data structure in php

        On 1 Gen, 18:07, "C. (http://symcbean.blogsp ot.com/)"
        <colin.mckin... @gmail.comwrote :
        On 1 Jan, 13:26, and <andreaesposit. ..@gmail.comwro te:
        >
        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?

        Comment

        • and

          #5
          Re: Data structure in php

          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?

          Comment

          • Jerry Stuckle

            #6
            Re: Data structure in php

            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.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • Jerry Stuckle

              #7
              Re: Data structure in php

              and wrote:
              On 1 Gen, 18:07, "C. (http://symcbean.blogsp ot.com/)"
              <colin.mckin... @gmail.comwrote :
              >On 1 Jan, 13:26, and <andreaesposit. ..@gmail.comwro te:
              >>
              >>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.
              jstucklex@attgl obal.net
              =============== ===

              Comment

              • Jonas Werres

                #8
                Re: Data structure in php

                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;
                }
                ....
                }

                Comment

                • C. (http://symcbean.blogspot.com/)

                  #9
                  Re: Data structure in php

                  On 1 Jan, 19:15, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                  and wrote:
                  On 1 Gen, 18:07, "C. (http://symcbean.blogsp ot.com/)"
                  <colin.mckin... @gmail.comwrote :
                  On 1 Jan, 13:26, and <andreaesposit. ..@gmail.comwro te:
                  >
                  >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.

                  Comment

                  Working...