PHP-MySQL

PHP Array and Compressing Data

Following example shows that use of an array to sort records in ascending and descending order using PHP program. <?php $arr = array(‘Apple’, ‘Zensor’, ‘MITIndia’); echo “<br><b>Without sorted values are..</b><br>”; echo $arr[0], “<br>”; echo $arr[1], “<br>”; echo $arr[2], “<br>”; echo “<br><b>Sorted values are..</b><br>”; sort($arr); $len=count($arr); for($i=0; $i<$len; $i++) { echo $arr[$i], “<br>”; } echo “<br><b>Reverse …

PHP Array and Compressing Data Read More »

Share

mysqli-examples

Following examples shows that how to use mysqli functions to insert, update, delete and select records from database. mysqli, here the letter ‘i’ stands for improved version. Example 1 : Insert record to mysql database through php using MySQLi function. Step 1 : create a following html file. <html> <body> <form name=f1 action=”mysqli_ins.php” method=”POST”> Enter …

mysqli-examples Read More »

Share
Share
Scroll to Top