title: Use pgm_read_word in sprintf_P
body: <p>for my hobby arduino project I use PROGMEM to save dynamic memory space.</p>
  
  <p>I have build const chars and save them into an array table:</p>
  
  <pre><code>const char KEY[] PROGMEM= "z4PhNX7vuL3xVChQ1m2AB9Yg5.....";
  .
  .
  const char * const MARRAY[7] PROGMEM =
  {APN,URL,API,KEY,ACTION,TIMEZONE,IDENT,};
  </code></pre>
  
  <p>Now I want to use the strings inside a <em>snpritf_P</em>, but this code wont work as expected:</p>
  
  <pre><code>char * ptr = (char*) pgm_read_word(&amp;MARRAY[0]);
  snprintf_P(conv, sizeof(conv), PSTR("AT+SAPBR=3,1,\"APN\",\"%s\""), ptr);
  </code></pre>
  
  <p>If I create a string and copy the char into the string it will work:</p>
  
  <pre><code>char * ptr = (char*) pgm_read_word(&amp;MARRAY[0]);
  String buffer [80];
  strcpy_P (buffer, ptr);
  snprintf_P(conv, sizeof(conv), PSTR("AT+SAPBR=3,1,\"APN\",\"%s\""), buffer);
  </code></pre>
  
  <p>I really do not understand why the first code not works, <em>snprintf</em> is normally expecting a <em>char</em> as far as I know?</p>
  
  <p>Any tips/help would be great, I already read the <a href="https://www.arduino.cc/en/Reference/PROGMEM" rel="nofollow" title="Arduino PROGMEM Reference">Arduino PROGMEM Reference</a> 
  but still wont understand it.</p>
  
  <p>Cheers From Austria</p>