By using file_get_contents() I am getting values from the file. In the file its having more than 500 property values and for each property having 79 fields.
$dir = dirname(FILE); --> getting the directory path
$file_path = $dir . "/datafeeds/vebraproperties.txt"; --> getting the file path
$del = stripslashes("\n"); --> given the character with which need to explode the contents.
$pieces = file_get_contents($file_path); --> getting contents from the file.
$val = explode($del,$pieces); --> explode the values in the file by the "\n", here i ma getting the properties in array.
"1699279410","70414","2","Tonacliffe Road","Tonacliffe Road, Whitworth","Rochdale","Lancashire","OL12 8SS","OL12 8SS","399950","","Detached","0","5","0","Stunning and well presented, deceptively spacious executive detached property built on a small development by HB Homes, the property would provide an excellent family home and benefits from stunning views to front and rear in a semi rural location. Briefly comprising of entrance lobby, lounge, study, wc, utility, dining room, kitchen, double integral garage, 2nd wc, five bedrooms two with en-suite, four piece family bathroom, hardwood double glazing, gas central heating, beautiful gardens, viewing highly recommended."
These are contents which i am getting after explode. No i want each from this array and also need to insert these values in to the database.
If having any queries or you didn't get what i said then please let me know.
Please help me out from this 😕