Skip to:
Content
Pages
Categories
Search
Top
Bottom

Data from database

  • Avatar of sameast
    sameast
    Participant

    @sameast

    Hi Guys

    I need some help i am using this code in my profile-loop.php file and it does the job it echos out all the data from my check boxes (Sector) section in the database.

    <?php $platforms = xprofile_get_field_data(‘Sector’);

    $data = xprofile_format_profile_field(‘checkbox’, $platforms);

    echo $data; ?>

    this is the data that i get outputted ,

    “Manufacturing, Bio science, Public sector, Transport/logistics, Environmental”

    (Which is great because these are my check boxes within the Sector section).

    The problem im having is. Its all just one big block off text i need to wrap a list element around each individual one for styling.

    like this.

  • Manufacturing
  • Bio science
  • Public sector
  • Transport/logistics
  • Environmental
  • Could anyone tell me how to do this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Avatar of Hugo
Hugo
Moderator

@hnla

I’m no master of PHP but what you described above is exactly what I would have written, there probably is a better approach if one had a deeper knowledge of BP/WP though.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.