PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hello. I'm finding this surprisingly confusing, and more surprising at how no one else seems to be confused by it.
In PHP I need to detect a line for a blank space using fgets(). I've tried using the following "\n" '\n' "\r\n" 'null' ' ' " " etc. and nothing seems to work
The following function is suppose to read a text file and set $cap to the paragraph in the text file until a blank line is read in the text file (the entire thing is in another loop to do it again for another paragraph until end of file)
Tried em both and couldn't get them to work. I figured I could simplify the whole process tho. Instead of planning on multiple lines of input per paragraph, my function that writes to the file will force every paragraph to be on one line. Then its just one fgets() per paragraph. Thx for trying tho.
Thank you all for your help. I used pieces from everyone's post and eventually got the thing fully working. Had to get a bit nuts and include the functions substr() and strlen()