#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Kuala Lumpur
    Posts
    15
    Rep Power
    0
    I have an onclick entry in file 1. Then i want to compare with this entry with the name file in the other file(file 2).
    Example :
    file 1
    entry-onclick = sunshine.jpg

    file 2
    file = sunshine.jpg
    flower.jpg

    Compare :
    entry (onclick) == sunshine.jpg from file 2.

    How to do that? Please give some tip or coding.

    Thank you.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Hi,

    Read the files first in to an array...

    $fp=fopen("file1.txt","r");
    $first_array_variable=fread($fp,filesize("file1.txt"));
    close($fp);

    same way you have to read the second file also.

    now both file values are stored in array variables..
    and you have to match that now..

    loop through the second array and match a value using any of regx() functions.




    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 09:27 AM
  2. Pointer problems opening file *formatted*
    By LAKI in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 07:06 AM
  3. Replies: 1
    Last Post: February 8th, 2004, 02:59 PM
  4. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 08:42 PM
  5. Overwritng contents of Binary file in C
    By nmsudhan in forum C Programming
    Replies: 3
    Last Post: January 14th, 2004, 07:43 AM

IMN logo majestic logo threadwatch logo seochat tools logo