\n"; // loop through all the returned results foreach ($scouts as $participant) { // field 1.3 is the first name. I upper cased the first letter for consistency $fname = ucfirst($participant['1.3']); // I wanted to show only the first initial of the last name, also upper case $linitial = strtoupper(substr($participant['1.6'],0,1)); $html .= "\t
  • $fname $linitial
  • \n"; } $html .= ''; // return the html output from the shorcode return $html; }