PHP nextLine with String
<p>I wrote a php search script on my site for checking to see if a package exists in a text file or not (I used <code>file_get_contents</code>.) It takes what the user entered and combines it with the string 'BUILD: ' Below is an example of the file and I'll explain in the paragraph following it:</p>

<pre><code>BUILD: packageA
URL: www.package-a.com

BUILD: packageB
URL: www.package-b.com

BUILD: packageC
URL: www.package-c.com
</code></pre>

<p>So if a user were to search "packageB", it would be combined with "BUILD: " making the variable I'm testing with have the value: "BUILD: packageB". I have a conditional saying if that string exists or not; everything's working good on that end.</p>

<p>My question/problem is how can I list the URL: line beneath it with an echo? I've been testing some ideas with <code>strlen()</code> and I can't seem to get it and the text file has different strlens for entry. Is there a way to make PHP force a <code>"nextLine()"</code> if there is such a thing... does PHP recognize return delimits?</p>

<p>Thank you!</p>
