Hi,
I’m writing my first php program. I’ve had some programming experience with C++, but I’m having a bit of trouble understanding how php does input. I’m using fgets to read input from the user. I believe fgets reads everything up to the newline character? So I want to get the user to type in his last and first name, and store them in different variables. The only way I see to do this is to use fgets, then explode to split the first name and last name, then store them. Is there a way to read input like in C++, where it reads up to white space, then the next variable stores the next string?
Sorry if my explanation is unclear, I just recently got into programming, so I’m relatively new the terms and concepts. Thank you for any help.