Site Cloner PHP Script
Bargain Hunter PHP Script
Job Hunter PHP Script
Site Login and Access Control PHP Script

PHP strtolower() and strtoupper() Functions

The strtolower() and strtoupper() php functions can be used to change the case of a variable. The example below shows how that is done.

include(‘connect.inc’);
$db = public_db_connect();

$command = “SELECT DISTINCT firstname, lastname, email FROM table_sort WHERE id >0 ORDER BY lastname ASC” ;
$result = mysqli_query($db, $command);
while($row = mysqli_fetch_assoc($result)){
$firstname = strtolower($row[‘firstname’]);
$lastname = strtoupper($row[‘lastname’]);
$email = $row[’email’];
echo $firstname.”-“.$lastname.”-“.$email.”<br/>”;
}