0

I stuck on this problem: I want to order the array so that when I iterate through a foreach loop it is natural ordered by the [name] field (i.e., 12 VAC,32 VDC,120 VAC rather than 12 VAC, 120 VAC, 32 VDC). Any help would be appreciated.

Array ( 
    [6] => WP_Term Object ( 
        [term_id] => 2320 
        [name] => 12 VAC
        [taxonomy] => pa_voltage 
     ) 

    [11] => WP_Term Object ( 
        [term_id] => 2058 
        [name] => 32 VDC 
        [taxonomy] => pa_voltage 
    ) 

    [13] => WP_Term Object ( 
        [term_id] => 300 
        [name] => 120 VAC 
        [taxonomy] => pa_voltage  
    ) 
)
jkdoyle
  • 329
  • 1
  • 2
  • 5

0 Answers0