slashpine Posted December 3, 2008 Share Posted December 3, 2008 I am tying to get the $query variable to display in Title Case... how can I use the following statement with "ucwords" ? echo "($query) in Newark"; tia... Quote Link to comment https://forums.phpfreaks.com/topic/135402-solved-syntax-of-echo-statement/ Share on other sites More sharing options...
premiso Posted December 3, 2008 Share Posted December 3, 2008 echo "(" . ucwords($query) . ") in Newark"; Quote Link to comment https://forums.phpfreaks.com/topic/135402-solved-syntax-of-echo-statement/#findComment-705239 Share on other sites More sharing options...
slashpine Posted December 3, 2008 Author Share Posted December 3, 2008 ok that works but the $query is in () ? I got it now thanks echo "(" . ucwords($query) . ") in Newark"; Quote Link to comment https://forums.phpfreaks.com/topic/135402-solved-syntax-of-echo-statement/#findComment-705248 Share on other sites More sharing options...
premiso Posted December 3, 2008 Share Posted December 3, 2008 ok that works but the $query is in () ? From your first post, I thought that was what you wanted. Simple fix: echo ucwords($query) . " in Newark"; And your done. Quote Link to comment https://forums.phpfreaks.com/topic/135402-solved-syntax-of-echo-statement/#findComment-705250 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.