Please help me to solve this code
Doraemon420 (0)

please help to solve

i want to use all of my variables in uppercase letter by using "foreach loop" but there is showing error.

Code is down below:

<?php $db['db_host'] = "localhost"; $db['db_user'] = "root"; $db['db_pass'] = ""; $db['db_name'] = "cms"; foreach($db as $key => value){ define(strtoupper($key),value); } $connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); if($connection){ echo "We are connected"; } ?>
You are viewing a single comment. View All