title: How to build string for ethercard webpage, arduino
body: <p>How do i build a suitable string from an array of data values, that the ethercard library will accept to serve as a webpage? From the examples i have the below thus far, but i want to use an variable number of array elements (up to the limit of the packet buffer size).</p>
  
  <pre><code>static word homePage() {
    bfill= ether.tcpOffset();
    bfill.emit_p(PSTR(
      "HTTP/1.0 200 OK\r\n"
      "Content-Type: text/plain\r\n"
      "Pragma: no-cache\r\n"
      "\r\n"
      "$D\n"
      "$D\n"
      "$D\n"
      "$D\n"
      ), 
      data[0],data[1],data[2],data[3]
    );
    return bfill.position();
  }
  
  void loop() {
    if (ether.packetLoop(ether.packetReceive())) {
      ether.httpServerReply(homePage());
    }
  }
  </code></pre>
  
  <p>I guess a side question is where do i learn about c strings, duh. (php guy).</p>