get data into an array

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

    get data into an array

    hi all,

    how can i take this data and create an array? i have no idea where to
    start.

    thanks in advance.

    "STEAM_0_1_9791 900"
    {
    "Freq" "3"
    "Count" "3"
    "1" "something"
    "Namefreq" "3"
    "2" "something else"
    "3" "anything"
    }

  • ZeldorBlat

    #2
    Re: get data into an array


    Sam wrote:
    hi all,
    >
    how can i take this data and create an array? i have no idea where to
    start.
    This would be a good place to start:
    <http://www.php.net/manual/en/language.types. array.php>

    Comment

    • Sam

      #3
      Re: get data into an array


      ZeldorBlat wrote:
      Sam wrote:
      hi all,

      how can i take this data and create an array? i have no idea where to
      start.
      >
      This would be a good place to start:
      <http://www.php.net/manual/en/language.types. array.php>
      i should have been more specific, i meant i have data in that format,
      how can i get that into an array.

      Comment

      • Johnny

        #4
        Re: get data into an array


        "Sam" <samkline@gmail .comwrote in message
        news:1159304748 .498931.23560@m 73g2000cwd.goog legroups.com...
        >
        ZeldorBlat wrote:
        Sam wrote:
        hi all,
        >
        how can i take this data and create an array? i have no idea where to
        start.
        This would be a good place to start:
        <http://www.php.net/manual/en/language.types. array.php>
        >
        i should have been more specific, i meant i have data in that format,
        how can i get that into an array.
        >
        errr... how about:
        $samsarray = array("Freq"=>" 3",Count"=>"3", ...);

        perhaps you were really asking "how can I extract data from this other
        data"?

        you can use str functions to mess with stuff like that, fer instance you
        might search for a token with
        Find the position of the first occurrence of a substring in a string

        then another token and then get the bit between them
        maybe do that again then put them 2 in the array. repeat rinse wash


        Comment

        Working...