Re: input statement in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 July 2010 15:38, Bavithra R <bavithra.r@xxxxxxxxx> wrote:
> hi friends..
>
>
> Is there any equivalent statement in php  for "scanf" or "cin" in c or c++?
> That is without using html and creating forms.

WOW. Completely surprised by the two responses that were given.

<?php
while ($userinfo = fscanf(STDIN, "%s\t%s\t%s\n")) {
    print_r($userinfo);
}
?>

STDIN is a predefined resource, so no need to fopen()/fclose() it.

Hope this helps.

Regards,

Richard Quadling.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux