Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

class_attribut.php File Reference

Manage the attribut of the card. More...

Go to the source code of this file.

Data Structures

class  Attribut
 Manage the attribut of the card. More...

Functions

 SortAttributeById ($p_attribut)
 Sort an array of object attribut thx the ad_id.


Detailed Description

Manage the attribut of the card.

Definition in file class_attribut.php.


Function Documentation

SortAttributeById p_attribut  ) 
 

Sort an array of object attribut thx the ad_id.

Parameters:
array of Attribut objects
Returns:
the ordered array

Definition at line 50 of file class_attribut.php.

References $i, and $t.

Referenced by fiche::getAttribut().

00050                                         {
00051   for ($i=0;$i< sizeof($p_attribut)-1;$i++) {
00052       if ( $p_attribut[$i]->ad_id > $p_attribut[$i+1]->ad_id ) {
00053         // then swap them
00054         $t=$p_attribut[$i];
00055         $p_attribut[$i]=$p_attribut[$i+1];
00056         $p_attribut[$i+1] = $t;
00057         $i=0;
00058       }
00059     }
00060   
00061   return $p_attribut;
00062 }