glenelkins Posted January 13, 2007 Share Posted January 13, 2007 HiHow would I remove all characters from a string except for the first.For example: "House" i want to keep "H" Link to comment https://forums.phpfreaks.com/topic/34019-remove-all-characters/ Share on other sites More sharing options...
taith Posted January 13, 2007 Share Posted January 13, 2007 $string='House';echo $string{0}; #H Link to comment https://forums.phpfreaks.com/topic/34019-remove-all-characters/#findComment-159911 Share on other sites More sharing options...
Nicklas Posted January 13, 2007 Share Posted January 13, 2007 better to use [ and ], { and } will be out of use in PHP6 Link to comment https://forums.phpfreaks.com/topic/34019-remove-all-characters/#findComment-159914 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.