Having so many problems understanding php?

marcey t

New member
Trying to understand php and having a hard time. Looking for help to understand what I am doing wrong with a program
I'm not looking for someone to do it for me. I want to know what I am doing wrong so really just looking for someone to talk it through with me.
$telephonelist = fopen("recordsdirectory.txt","a+");
if (filesize ("recordsdirectory.txt")<=0)
{
echo "empty";
exit (0);
}
$contents = fread($telephonelist, filesize("recordsdirectory.txt"));
$newlistArray = explode(",",$contents);
foreach ($newlistArray as $telephonelist)
$list=array("$lastname" and "$firstname"=>"$areacode"and"$phonenumber");

{

echo "$list";
}
fclose($telephonelist);
 
Well, unless you provide a little more detail, you won't get any help. Post some code and ask for some help. As long as you don't ask anyone to do your homework for you. ;-)
 
Back
Top