note 60760 deleted from function.readline by hholzgra

From: Date: Thu, 02 Aug 2012 12:39:13 +0000
Subject: note 60760 deleted from function.readline by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189690@lists.php.net to get a copy of this message
Note Submitter: haukew at gmail dot com ---- A readline for ux systems without gnu-readline. (KISS) function readline($prompt="") { print $prompt; $out = ""; $key = ""; $key = fgetc(STDIN); //read from standard input (keyboard) while ($key!="\n") //if the newline character has not yet arrived read another { $out.= $key; $key = fread(STDIN, 1); } return $out; }

« previous php.notes (#189690) next »