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. 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); 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 Link to comment https://forums.phpfreaks.com/topic/64775-solved-go-to-a/#findComment-323132 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.