Vink Posted December 6, 2016 Share Posted December 6, 2016 Hi! I have the following problem: From 2 text files I get 2 variables with: $fp = @fopen ("category.txt", "r"); if ($fp) { while(!feof($fp)) { $lines[] = fgets($fp); } fclose($fp);} The second is the same but from another file. If I compare the 2 variables with: if($lines[2] == $other[4]) echo "the same"; That doesn't work and I do not know why.. Can somebody help? regards Quote Link to comment https://forums.phpfreaks.com/topic/302693-compare-variables/ Share on other sites More sharing options...
benanamen Posted December 6, 2016 Share Posted December 6, 2016 You have a whole other thread on this with numerous responses here http://www.codingforums.com/php/381805-compare-variables.html?highlight=compare Quote Link to comment https://forums.phpfreaks.com/topic/302693-compare-variables/#findComment-1540082 Share on other sites More sharing options...
Vink Posted December 7, 2016 Author Share Posted December 7, 2016 Hi Yes, but jet no solution to the problem Its logical for me that I try it somewhere else or is that not allowed? Quote Link to comment https://forums.phpfreaks.com/topic/302693-compare-variables/#findComment-1540095 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.