Ho there...I really wonder what's wrong with this script. The error is in this line below: if((count($info) != 1) && ($folder == $info[2])) echo "<table><tr><td><a href=" . $info[1] . ">" . $info[0] . "</a><br></td></tr></table>"; The condition ($folder == $info[2]) is not working! I hope you can help me! Here's the code:
<?php $link_name = "Tudo sobre automação"; $link_address = "http://www.automacao.eng.br"; $link_folder = "faculdade"; $file = "teste.txt"; function write($file,$link_name,$link_address,$link_folder) { $file=fopen("$file","w"); fwrite($file,"$link_name|$link_address|$link_folder\n"); fclose($file); } function read($file,$folder) { $file=fopen("$file","r"); while (!feof ($file)) { $buffer = fgets($file,1024); $info = explode("|",$buffer); if((count($info) != 1) && ($folder == $info[2])) echo "<table><tr><td><a href=" . $info[1] . ">" . $info[0] . "</a><br></td></tr></table>"; } fclose($file); } write($file,$link_name,$link_address,$link_folder); read($file,"faculdade"); ?> Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]