johnwayne77 Posted February 2, 2007 Share Posted February 2, 2007 is there anyway I can echo only the first 3 characters from a variable? like : $variable = 'john'; echo $variable,3; so it will print: 'joh' Quote Link to comment https://forums.phpfreaks.com/topic/36803-solved-echo-only-a-predefined-number-of-characters/ Share on other sites More sharing options...
effigy Posted February 2, 2007 Share Posted February 2, 2007 Look at substr. Quote Link to comment https://forums.phpfreaks.com/topic/36803-solved-echo-only-a-predefined-number-of-characters/#findComment-175577 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.