Re: [PHP-DB] input statement in php

[email protected] (Richard Quadling)
Newsgroups php.db
Message-ID <[email protected]>
On 26 July 2010 15:38, Bavithra R <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.