Hello,
I am getting a headache doing this and do not understand why the file is bieng like this.
I am trying to write a file with category name and sub cat name like "catname/subcatname". But when php writes the file it shows as:
"catname1/
subcatname
catname2/
subcatname"etc..
Where as it should write:
"catname1/subcat1
catname2/subcat"
etc..
here is the php code
for($i=35;$i<=47;$i++){
$sub=str_replace(" ","_",$array[$i]);
$content.=$main."/".$sub;
}
$handle=fopen("subcats.txt","a");
fwrite($handle,$content);
PLease help 🙂
😕 😕