RE: [PHP] Adding a URL

From: Date: Sun, 30 Mar 2003 07:53:40 +0000
Subject: RE: [PHP] Adding a URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141628@lists.php.net to get a copy of this message
On 30-Mar-2003 Scott Thompson wrote: > Hi, > > I am using the following code to query a database and build an HTML > table. > <snip> > /* Printing results in HTML */ > print "<table>\n"; > while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $line['email'] = '<A HREF="mailto:' .$line['email'] .'">' .$line['email'].'</A>'; > print "\t<tr>\n"; > foreach ($line as $col_value) { > print "\t\t<td>$col_value</td>\n"; > } > print "\t</tr>\n"; // how about this ? echo "\n<tr><td>", implode('</td><td>', $line), '</td></tr>'; > } > print "</table>\n"; <snip> > What I want (and can't figure out) is how to have each email address > have a URL (i.e. mailto:somebody@someaddress.com). > > I'm fairly new to PHP, I hope this question made some sense. > > Suggestions? > Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#141628) next »