nudo01 Posted October 11, 2010 Share Posted October 11, 2010 Hi guys! I really need your help... :'( I'm new to PHP and I need to make a code like this: List of towns (names both finnish and swedish) and their town codes. I've made it this far. <?php $a = file_get_contents("suomi.txt"); //hakee datan $b = file_get_contents("ruotsi.txt"); $a = str_replace(array("\r\n" , "\t") , array("[uusi rivi]" , "[tab]") , $a); //määrittää rivinvaihdon ja tabin $b = str_replace(array("\r\n", "\t") , array("[uusi rivi1]", "[tab1]"), $b); foreach( explode("[uusi rivi]" , $a) as $viivat) { //looppaa "suomi.txt" print "<tr>"; foreach( explode("[tab]" , $viivat) as $lista) { print "<td>"; print $lista; print "</td>"; } } print "</tr>"; ?> So I need another loop code that doesn't import town codes, only swedish names. I have to use functions like intval, is_numeric etc but I can't understand any of the manuals. Thank you. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/215599-help-really-needed-loop-is_numeric-and-txt-file/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.