Hello everyone.

I'm  encountering difficulties using my arrays.

while ($row = mysql_fetch_array($result)) {
        $link[$c] = $row['link'];
        $c = $c + 1;
        }


This is where I try  using it.




while ($row = mysql_fetch_array($result)) {
        $date = $row['date'];
        $path = $row['path'];
        $entry_name = $row['entry_name'];
        $company_name = $row['company_name'];

        $file = basename ($path);

        while ($c >= 0) {

                echo $link[$c];


                if($file == $link[$c])
                {
                        $file = "This is new";
                }

        $c = $c -1;
}

$contact_list2 .= "$date   $file   $entry_name   $company_name\n";

}



Comment:  The    echo $link[$c]  works fine. It displays what it should.
However the if statement does not because $file and $link[$c] are equal on
several occasions yet the content of $file doesn't change...  Thank You.


-- 
PHP General 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]

Reply via email to