Re: totally stumped...

From: Date: Fri, 16 May 2003 23:16:54 +0000
Subject: Re: totally stumped...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-147992@lists.php.net to get a copy of this message
On Fri, 2003-05-16 at 18:25, John Coggeshall wrote: > > echo '<select name="protein">'."\n"; > > foreach($p_val as $value) { > > $str = ($value != $_POST['protein']) ? "<option > > value=\"$v\">" . > > sprintf("%.1f", $v) . "g</option>" : "<option > > value=\"$v\" > > selected=\"selected\">" . sprintf("%.1f", $v) . > > "g</option>"; > > echo $str ."\n"; > > } > > echo "</select>\n"; > > your looping through $p_val as $value... then you are doing something > with the $v variable when you assign $str... where does this $v come > from?? > Yup, my bust, I saw right after I posted... I think it's just been too long a day.. Time to be done... :-)

« previous php.general (#147992) next »