ma più che funzione basta una hashtable
http://it.php.net/manual/en/language.types.array.php
qualcosa tipo:
cosi poi per usarlo faicodice:$categoryImages = array ( '1s' => 'star_little.gif', '2s' => 'star_little2.gif', '3s' => 'star_little3.gif', '4s' => 'star_little4.gif', '5s' => 'star_little5.gif' );
codice:$img_cat = $categoryImages[$row['categoria']];![]()


Rispondi quotando