Not being lame, but I'm not sure I understand exactly what
you're looking to
do.
> Let me take two features (Conv_Fonts_Flg and
Ppr_Tray_Lock_Flg) and this
> is
> how I would get them to show on the page:
OK, have you tried this? Is it nto working? This is how you
want to get
them to work o the page, is this how they're going onto the
page and you
need to add more, orr...is this part not working yet?
> <td><?php print_features(rs_Conv_Fonts_Flg,
"Security and Convenience
> Font");
> ?></td>
> <td><?php print_features(rs_Ppr_Tray_Lock_Flg,
" Paper Tray Lock");
> ?></td>
OK, you're goign to need to check that function if you want
it to print
anyting, like this:
<?php echo print_features(rs_Conv_Fonts_Flg,
"Security....");?></td>
>
> And then am I putting this in the top of the document:
>
> /*This function will add features to an array */
> function add_feature($Conv_Fonts_Flg){
> if ($Conv_Fonts_Flg == "YES"){
> features[] = $Conv_Fonts_Flg;
> }
> return features;
> }
OK, above, you fed two variables into your function, here
you're only taking
one in - so that's a problem. It looks like you submitted two
properties,
perhaps the table field name and the 'viewable' name, so
we'll build your
array like this:
function add_feature($field, $printerFeature,
$featuresArray){
//it would be best to loop through all features in here, but
i'm not sure
exactly where we're at on the page anymore? or how you're
doing this? should
be a do-while loop dependent on a dw recordset (such as your
featuers
listing, if these are all in one record, then we can do that
as well.
if($field == 'YES'){
$featuresArray[$field]=$printerFeature;
}
return $featuresArray;
}
function print_features($featuresArray){
foreach($featuresArray as $id=>$value){
echo 'whatever you want to do for that where $id is your
key, and $value
is the value of the current key being looped through';
}
}
to reference it, just put
$features[] = add_feature($row_DWRecordset['field'],
$row_DWRecordset['name'], $features);
The, if you want to list all array items:
print_features($features);
does this make sense? let's review this before goign on the
other part of
the email. i'm waking up slow today
> function add_feature($Ppr_Tray_Lock_Flg){
> if ($Ppr_Tray_Lock_Flg == "Y"){
> features[] = $Ppr_Tray_Lock_Flg;
> }
> return features;
> }
> //This will loop through your recordset to get all of
your informaiton and
> sort it out.
> do{
> $Prt_Desc = rs info;
> $Conv_Fonts_Flg = rs_Conv_Fonts_Flg
> $Ppr_Tray_Lock_Flg = rs_Ppr_Tray_Lock_Flg
>
> Sorry for being so lame!
> Julie
>