t_k_eoh Posted August 14, 2007 Share Posted August 14, 2007 Hi guys, I need some basic help on how to "go to a location" on a word. Eg. "Hello world" What function do I need to go to the location 5 alphabet from the left and include "1" so that the output becomes "Hello1 world"? Pls help. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/64775-solved-go-to-a/ Share on other sites More sharing options...
hitman6003 Posted August 14, 2007 Share Posted August 14, 2007 should be something like: echo substr($string, 0, 5) . "1" . substr($string, 6, strlen($string) - 6); Quote Link to comment https://forums.phpfreaks.com/topic/64775-solved-go-to-a/#findComment-323130 Share on other sites More sharing options...
keeB Posted August 14, 2007 Share Posted August 14, 2007 http://php.net/substr Quote Link to comment https://forums.phpfreaks.com/topic/64775-solved-go-to-a/#findComment-323132 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.