Experts Exchange connects you with the people and services you need so you can get back to work.
$fp = fopen("FILEPATH", "r");
while ($line = fgets($fp))
$first = trim(strtok($line, "|"));
if(strtotime($first) != false) //see if it's a date
$second = trim(strtok("|"));
if($second == "q1") //make sure it says q1
$third = trim(strtok("|"));
if(strncmp($third, "INSERT INTO payments", 20) == 0) //if it's an insert, print it.
Open in new window
Be seen. Boost your question’s priority for more expert views and faster solutions
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Your question, your audience. Choose who sees your identity—and your question—with question security.