cooldude832 Posted July 10, 2007 Share Posted July 10, 2007 going to sound stupid, but how do i take the first $X characters off a string? Link to comment https://forums.phpfreaks.com/topic/59196-solved-taking-the-first-x-characters-off-a-string/ Share on other sites More sharing options...
trq Posted July 10, 2007 Share Posted July 10, 2007 substr. Link to comment https://forums.phpfreaks.com/topic/59196-solved-taking-the-first-x-characters-off-a-string/#findComment-294059 Share on other sites More sharing options...
teng84 Posted July 10, 2007 Share Posted July 10, 2007 going to sound stupid, but how do i take the first $X characters off a string? what are you the one asking and $X variable or character Link to comment https://forums.phpfreaks.com/topic/59196-solved-taking-the-first-x-characters-off-a-string/#findComment-294060 Share on other sites More sharing options...
cooldude832 Posted July 10, 2007 Author Share Posted July 10, 2007 i did it with substr_replace($string,"",0,$x); is that effective? Link to comment https://forums.phpfreaks.com/topic/59196-solved-taking-the-first-x-characters-off-a-string/#findComment-294061 Share on other sites More sharing options...
teng84 Posted July 10, 2007 Share Posted July 10, 2007 i did it with substr_replace($string,"",0,$x); is that effective? strstr that return the first occurrence of the string Link to comment https://forums.phpfreaks.com/topic/59196-solved-taking-the-first-x-characters-off-a-string/#findComment-294063 Share on other sites More sharing options...
trq Posted July 10, 2007 Share Posted July 10, 2007 strstr that return the first occurrence of the string Which does not help at all. i did it with substr_replace($string,"",0,$x); is that effective? Yes. Link to comment https://forums.phpfreaks.com/topic/59196-solved-taking-the-first-x-characters-off-a-string/#findComment-294078 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.