Jump to content

If Statement help


CodeWriter

Recommended Posts

The code adds a space after the $selleruser2 variable for some reason.

Any help on this problem would be appreciated.

$productsdb=file("Database/Usersfile.txt");

foreach($productsdb as $key1=>$val1) 
{$products[$key1]=explode("||",$val1);}

for($k1=0;$k1<sizeof($productsdb);$k1++) 
{
$selleruser2=$_POST["selleruser"];

if ($selleruser2==$products[$k1][0])
{
echo "match";
}
}

Link to comment
https://forums.phpfreaks.com/topic/142417-if-statement-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.