current user list

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 3, 2013   (RSS)

By Maurice - July 2, 2013

Hi,

I made a list in the user accounts now i want to display the list in a li code but its not working

what am i doing wrong

<ul class="list_1">
<li><?php echo join('</li><li>', $CURRENT_USER['opleidingen']); ?></li>
</ul>

thnx for some ideas

greetz Mauric

-------------------------------------------

Dropmonkey.nl

By gregThomas - July 3, 2013

Hi  Mauric,

Are you getting an error with the current code? What is output with the current system? Is this a multi option list?

I think the problem might be if opleidingen is a multi list option field it will be a string with a tab separated list of the options selected. You could turn this list into an array using this method:

<li><?php echo join('</li><li>', explode("\t",trim($CURRENT_USER['opleidingen']))); ?></li>

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com