input statement in php

input statement in php

am 26.07.2010 16:38:54 von Bavithra R

--00c09f9db0c507e145048c4b582e
Content-Type: text/plain; charset=ISO-8859-1

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.


Thanks in advance
regards
--Bavithra.R

--00c09f9db0c507e145048c4b582e--

RE: input statement in php

am 26.07.2010 17:28:00 von HallMarc Websites

>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.


>Thanks in advance
>regards
>--Bavithra.R

No, there are no equivalents in PHP.



__________ Information from ESET Smart Security, version of virus signature
database 5314 (20100726) __________

The message was checked by ESET Smart Security.

http://www.eset.com



__________ Information from ESET Smart Security, version of virus signature
database 5314 (20100726) __________

The message was checked by ESET Smart Security.

http://www.eset.com



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

RE: input statement in php

am 26.07.2010 20:48:47 von Daevid Vincent

> -----Original Message-----
> From: Bavithra R [mailto:bavithra.r@gmail.com]
> Sent: Monday, July 26, 2010 7:39 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] input statement in php
>
> 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.
>
>
> Thanks in advance
> regards
> --Bavithra.R

There unfortunately isn't any scanf() but if you're trying to get user
input on a CLI, then you can either use the argv/argc options or do
something like this tutorial does.

http://www.ehow.com/how_5321606_prompt-line-interface-using- php.html


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

Re: input statement in php

am 27.07.2010 12:46:40 von Richard Quadling

On 26 July 2010 15:38, Bavithra R 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.

while ($userinfo =3D 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