Here is my block of php I want to capitalize the first letter in the value the string returns from $user->data['username_clean']
The method I tried didn't work with this error.
Fatal error: Call to undefined method
It is likely however that I formatted it incorrectly. php code is here.
<?php
if ($user->data['user_id'] == ANONYMOUS) {
echo '
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Login<span class="caret"></span></a>
<ul class="dropdown-menu">
<form id="loginform" method="post" action="/forums/ucp.php?mode=login">
<label>Username</label>
<input name="username" type="text" id="username" class="width120 textbox" tabindex="1" />
<label>Password</label>
<input name="password" type="password" id="password" class="width120 textbox" tabindex="2" />
<label>Remember Me?:</label>
<input type="checkbox" name="autologin">
<input type="submit" value="Login" name="login">
<input type="hidden" name="redirect" value="indextest.php"
</form>
</li>';
} else {
echo '
<li class=dropdown>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">', $user->data['username_clean'], '<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">User Control Panel</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Logout</a></li>
</ul>
</li>';
}
?>