6. Working with PHP To work PHP in our system we must download the following packages. The first step is to download the packages: • Apache : http://httpd.apache.org/ • PHP : http://www.php.net/ • MySQL :www.mysql.com
18. PHP String A string variable is used to store and manipulate a piece of text. To declare a string we can write: <?php $text_str= “Hello World!”; echo “$text_str” ; ?>
19. PHP Arrays By providing the values as arguments to the array() function: <?php $citylist = array("Noida", "Delhi", "Raipur", "Ambikapur", "Bhagalpur"); ?>
26. Working with Database Creating a Connection using mysql: In PHP, mysql_connect() function is used to connect to database . Syntax of mysql_connect: $con=mysql_connect(“localhost/ip”, “user_name”, “password”);