The two examples will show how to make upper and lowercase strings using PHP and mySQL. With mySQL, it is performed in the query. With PHP, built in PHP functions are used.
<?php include('connect.inc'); $db = public_db_connect(); $command = "SELECT DISTINCT LOWER(firstname) as first, UPPER(lastname) as last, LOWER(Email) as email FROM table_sort WHERE id >0 ORDER BY last ASC"; $result = mysqli_query($db, $command); while ($row = mysqli_fetch_assoc($result)) { $firstname = $row['first']; $lastname = $row['last']; $email = $row['email']; echo $firstname . "-" . $lastname . "-" . $email . "<br/>"; }
<?php 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/>"; }
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton