How to change letter on some position in the string?

G

Guest

How to change letter on some position in the string?

eg.

$word="This is my test string."

# 11111111111222# 12345678901234567890123

Change letter on 7 nth position to "X"

$word="This iX my test string."

# 11111111111222

# 12345678901234567890123

Or change letter on 15 nth position to "?"

$word="This is my tes? string."

# 11111111111222

# 12345678901234567890123



Thanks.


--

Hvala
Paul Rosenthal

------------------------------------------------
ROSENTHAL d.o.o.
Pavlinska 5
42000 Vara¾din
tel: 042/320045
mb: 098/284067
www.rosenthal.hr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,184
Messages
2,570,978
Members
47,561
Latest member
gjsign

Latest Threads

Top