![]() |
The readline() function is an inbuilt function in PHP that is used to read user input from the command line window. It provides a way to interactively prompt the user for input and capture their response as a string. Syntax: readline($prompt): string|false Parameters: This function accepts one parameter which is described below.
Return Value: The readline() function returns the provided string. This function will return false if no more data is found to be read. Program 1: The following program demonstrates the readline() function. PHP
Output
Enter your name: Hello, ! Nice to meet you. Program 2: The following program demonstrates the readline() function. PHP
Output: Welcome to the Interactive Survey! Reference: https://www.php.net/manual/en/function.readline.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 16 |