rh_connect(); $bot_result = $rh_i->query('SELECT work.titleweb, workxwebdomain.workid FROM work, workxwebdomain WHERE work.workid = workxwebdomain.workid AND workxwebdomain.webdomain = "BOT"'); $a = 1; while ($bot_row = $bot_result->fetch_assoc()) { $clean = preg_replace("/[^a-zA-Z0-9\/_| -]/", '', $bot_row["titleweb"]); $clean = strtolower(trim($clean, '-')); $clean_final = preg_replace("/[\/_| -]+/", '-', $clean); echo "".$a."\n "; $a++; } ?>