Jump to content

If and else


supermerc

Recommended Posts

This isnt working and I dont know why

 

<?php
if('$profile_info[level]' > 0) {
	echo "<h1><span style=\"color: red;\">{$profile_info['username']}</span>";
} else {
	echo "<h1>{$profile_info['username']}";
}
  ?>

 

The level is correct I tried echoing it out already and it shows the correct number for each but the username shows up as black even if the level is greater than 1

Link to comment
https://forums.phpfreaks.com/topic/44152-if-and-else/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.