Re: Output Blank?
| From: | Daniel Brown | Date: | Mon, 23 Jun 2008 18:19:30 +0000 |
| Subject: | Re: Output Blank? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275844@lists.php.net to get a copy of this message | ||
On Mon, Jun 23, 2008 at 1:46 PM, Dan Shirah <mrsquash2@gmail.com> wrote:
>
> if($numberFields) { // Check if we need to output anything
> $types = ifx_fieldtypes($query);
> if (isset($types)) {
> foreach($types as $field_name[] => $data_type) {
> }
> }
Is there a particular reason you're telling PHP that, "for each
$types variable, set this key of the $field_name array to equal
$data_type, and do nothing else about it"?
Is this what you meant to do for some reason?
<?php
if(isset($types)) {
foreach($types as $field_name => $data_type) {
$$field_name = $data_type;
// Or should it be something like this?
$column_names[] = $field_name;
}
}
$headers = join(',', $column_names)."\n";
?>
--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.