The following echo is currently all uppercase, how do I force the first letter capitalized and the rest lower case of each word but still limit the length using substr or something similar?
<?php echo substr($row['fulladdress'],0,20); ?>
The following echo is currently all uppercase, how do I force the first letter capitalized and the rest lower case of each word but still limit the length using substr or something similar?
<?php echo substr($row['fulladdress'],0,20); ?>
Should do it. Just wrap it in ucfirst function
<?php echo ucfirst(strtolower(substr($row['fulladdress'],0,20))); ?>
use ucfirst()
and strtolower()
<?php echo substr(ucfirst(strtolower($row['fulladdress'])),0,20); ?>