| Web Design & Programming Building websites, coding scripts or developing apps? html, css, javascripts, ajax, php, asp, java, c+, C++ and other geeky info is here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Status: Junior Member Join Date: Jul 2009 Posts: 3
![]() | How do I get it to stop being either all true or all false. It either keeps in the loop and won't let me out or won't loop at all. I want it to keep doing the program if I answer yes to "Would you like to do another?" and stop the loop if you answer no. What do I need to do? I have: while ($again = 'y') { blah blah blah print ( "Would you......\n"); $again = <STDIN> } I have even put an if statement in too. if ($again = 'n') { exit 0; } |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |