Insert a string inside a string

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

Insert a string inside a string

Post 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
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Insert a string inside a string

Post 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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Insert a string inside a string

Post 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
Post Reply