\*\+\-\%\|`&\$!#\(\)\[\]:\'\"]/',' ',$tagfile); // Split the input file to lines $taglines = preg_split('/\n/', $tagfile); // Split the column to tags $tagcolumns = preg_split('/\+/', $base_tag_form); // Print base form echo "".$tagcolumns[0].""; // Loop for each line foreach ($tagcolumns as $tag_pos => $tagcolumn) { // Loop for tag file foreach ($taglines as $tagline_num => $tagline) { $tag = preg_split('/,/', $tagline); $tag[1] = preg_replace('/\s/','',$tag[1]); if ($tagcolumn == $tag[1] ) { echo ",".$tag[0]; } } } } else { echo $base_tag_form; } } // END OF TAG SELECTION // ==================== // // That's all Folks! // ------------------------------------------------- ?>