troubleshooting Question

string thing - the trilogy completed

Avatar of pieter78
pieter78 asked on
PHP
19 Comments2 Solutions271 ViewsLast Modified:
Hi,

Last part of the trilogy "Lord of the Code", as a sequel to https://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21990659.html#17530491

Everything works so far, so the things I wanted to do are done. However, I got one idea later on, perhaps it is possible as well... The commands [b], [i], [link] and [img] are working (Tolga, thanks). The last idea is this:

USER INPUT
----------------------------
[ch]First paragraph[/ch]
Some text

[ch]Second paragraph[/ch]
Another line
----------------------------

should be converted to

----------------------------
<a href="#p1">First paragraph</a>
<a href="#p2">Second paragraph</a>
<br /><br />
<a name="p1">Some text

<a name="p2">Another line
----------------------------

If possible, I'd be glad to know!

Pieter
ASKER CERTIFIED SOLUTION
tolgaong

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 19 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros