So I have a text file that has 4 items in each line. I would like to store these into an array.

So this is an example of how they are stored:

imgur.com | link.com | 60 | 468

Thanks in advance

You can use the explode function to split up each line and create an array.

// For each record
$record = explode('|', $line);
$recordset[] = $record;
//...
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.