Multi-select to individual links

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 23, 2016   (RSS)

Hey Tim,

Here is how I'd do it:

  <?php $categories = getListOptions('blog', 'category');  ?>

  <?php foreach ($categories as $value => $label): ?>
    <a href="?<?php echo htmlEncode($value); ?>"><?php echo htmlEncode($label); ?></a> 
  <?php endforeach; ?>

The getListOptions will return a drop downs options, with the key being the value, and the value being the label. You can then cycle through these and create a link with the value in url.

Let me know if you have any questions. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thanks!

Cheers,

Tim (toledoh.com.au)