Re: Help with a very small array problem

From: Date: Tue, 27 Feb 2001 22:57:29 +0000
Subject: Re: Help with a very small array problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41928@lists.php.net to get a copy of this message
<?php foreach($blink as $pos => $val) echo "<a href='{$blink[$pos]}'>{$but[$pos]} </a> "; ?> or better. <?php $link['slashdot.org'] = 'http://slashdot.org'; $link['adcritic'] = 'http://www.adcritic.com'; $link['php.net'] = 'http://www.php.net'; foreach($link as $pos => $val) echo "<a href='$val'>$pos </a> "; ?> -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 lee@mediawaveonline.com ""YoBro"" <nospam@brochures.co.nz> wrote in message news:97hcsp$59n$1@toye.p.sourceforge.net... > > Hello, > > I have a problem getting this to work right. > I have two variables that store the name of a Link and the actual link. > I am trying to display them on the page but it doesn't do it like i would > have hoped. > > I want it to appear like this > [Link1] [Link2] [Link3] > > <? > foreach ( $blink as $valink ){ //The link path > echo " [<a href=$valink>"; > > foreach ($but as $val ){ //The link Text > echo "$val"; > } > echo "</a>]"; > } > > ?> > > > Please help > -- > Regards, > > > YoBro > ------------------------------------------------------------- > DO NOT REPLY TO THIS VIA EMAIL > PLEASE USE THE NEWSGROUP > All emails sent to this address are automatically deleted. > This is to avoid SPAM! > ------------------------------------------------------------- > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#41928) next »