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' 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. 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
Archived
This topic is now archived and is closed to further replies.