Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default 'read data'

    does php have the equivalent of a 'read... data' type statement? So,

    read $a
    ..
    ..
    ..
    data 5, 6, 7, -1

    would assign to $a the value '5' and then carry out instructions that lie
    between the 'read' and 'data' statements, before reading the next piece of
    data, that being '6'.

    I know the BASIC language has this sort of thing, but cant seem to find the
    equivalent for PHP..
    thanks


    Jeremy Watts Guest

  2. Similar Questions and Discussions

    1. no more data to read
      We finally discovered why we were intermittently receiving a "No more data available to read" error. 1) Some of our datasources were setup with...
    2. CF7 - no more data available to read
      I'm having problems getting a datasource to verify in CF 7.0.1 through the adminintrator. We have installed the lastest drivers and updates. I...
    3. best (fastest) way to read data
      I have to read several Mb of data out of a database. There are several ways to do this, but with is the fastest? 1. To load a XML file from the...
    4. No more data available to read
      Error Executing Database Query. No more data available to read. We get the above error "randomly" -- I cannot replicate, but it occurs often...
    5. How to write and read data to and from .flv
      Can anyone explain the concept of how to write and read data (plain text messages, or entire objects) from and to a .flv file? The application...
  3. #2

    Default Re: 'read data'

    "Jeremy Watts" <jwatts1970@hotmail.com> wrote in message
    news:sYn%c.458$J07.356@newsfe5-gui.ntli.net...
    > does php have the equivalent of a 'read... data' type statement? So,
    >
    > read $a
    > .
    > .
    > .
    > data 5, 6, 7, -1
    >
    > would assign to $a the value '5' and then carry out instructions that lie
    > between the 'read' and 'data' statements, before reading the next piece of
    > data, that being '6'.
    >
    > I know the BASIC language has this sort of thing, but cant seem to find
    the
    > equivalent for PHP..
    > thanks
    You'd stick the data in an array and then loop through the array.

    Funny story. When I was working as the lab monitor at school, we had one
    student (halfway through her first BASIC course) who asked me "Why do we
    need files if we have the DATA statement for storing our data?"

    - Virgil


    Virgil Green Guest

  4. #3

    Default Re: 'read data'

    *** Jeremy Watts wrote/escribió (Tue, 07 Sep 2004 19:27:20 GMT):
    > read $a
    > data 5, 6, 7, -1
    >
    > would assign to $a the value '5' and then carry out instructions that lie
    > between the 'read' and 'data' statements, before reading the next piece of
    > data, that being '6'.
    >
    > I know the BASIC language has this sort of thing, but cant seem to find the
    > equivalent for PHP..
    Sorry, I don't know anything about Basic. You want to loop though an array
    of numbers, don't you? It'd be something like this:

    $data=array(5, 6, 7, -1);
    foreach($data as $i){
    // Here you do whatever you need with $i
    }

    --
    -- Álvaro G. Vicario - Burgos, Spain
    -- Thank you for not e-mailing me your questions
    --
    Alvaro G Vicario Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139