Page 1 of 1

Insert a string inside a string

Posted: Wed Mar 17, 2010 9:08 am
by klevis miho
How can I insert a substring(for example a space) inside dhe fifth position of a string:

This: 12:45Mtv
to this: 12:45 Mtv

Re: Insert a string inside a string

Posted: Wed Mar 17, 2010 9:52 am
by mikosiko
klevis miho wrote:How can I insert a substring(for example a space) inside dhe fifth position of a string:

This: 12:45Mtv
to this: 12:45 Mtv
http://www.php.net/manual/en/ref.strings.php

'nuff said

Re: Insert a string inside a string

Posted: Thu Mar 18, 2010 3:21 am
by Benjamin
Actually, considering that this question was posted in the Javascript forum everything you need to know is on this page:

http://www.javascriptkit.com/javatutors/string4.shtml