The-Last-Escape Posted May 2, 2007 Share Posted May 2, 2007 does anyone know a simple way to limit a string to the first word in it? Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/ Share on other sites More sharing options...
Ninjakreborn Posted May 2, 2007 Share Posted May 2, 2007 re-explain what you need. Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243539 Share on other sites More sharing options...
clown[NOR] Posted May 2, 2007 Share Posted May 2, 2007 maybe try $firstWord = explode(" ", "hello is the first word"); Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243540 Share on other sites More sharing options...
The-Last-Escape Posted May 2, 2007 Author Share Posted May 2, 2007 Ok thanks Clown NOR Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243543 Share on other sites More sharing options...
clown[NOR] Posted May 2, 2007 Share Posted May 2, 2007 no problem.. mark as solved if it answered your question Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243544 Share on other sites More sharing options...
The-Last-Escape Posted May 2, 2007 Author Share Posted May 2, 2007 Done Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243545 Share on other sites More sharing options...
Nameless12 Posted May 2, 2007 Share Posted May 2, 2007 if i remember correctly this is how you select everything before the first white space substr($string, 0, strpos($string, ' ')); Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243622 Share on other sites More sharing options...
The-Last-Escape Posted May 2, 2007 Author Share Posted May 2, 2007 Thanks Link to comment https://forums.phpfreaks.com/topic/49676-solved-truncate/#findComment-243627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.