Link to home
Start Free TrialLog in
Avatar of iceman19330
iceman19330

asked on

sort on foreach

trying to do a sort on a certain field but I am uncertain of how to do it.
<?php foreach($node->field_subcats as $sub): ?>
                <?php $cat = node_load($sub['nid']); ?>
                <li><a href="<?php print url('node/'.$cat->nid) ?>" id="#subcat-<?php print $cat->nid ?>"><?php print $cat->title ?></a></li>
                <?php endforeach ?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of gazzzzzzer
gazzzzzzer
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of iceman19330
iceman19330

ASKER

thanks