Jump to content

Text flip code


Dragy

Recommended Posts

Hi guys  ;)
I'm not very knowledgeable with PHP, altough I am editing scripts and fit them into my needs all the time. But right now I need a very specific piece of code, shouldn't be too long, but I have absolute no idea where to start.

I got a text variable, lets say $sometext = "blah"; Now what I wanna do is simply flip it, so the final result will be "halb". Now that is step one, but after that I think I'll also include some HTML code in that variable, something like $sometext = "blah <br> blah"; And I gotta flipthe text without flipping the <br>. I'm not sure how complicated it is, but I just need that piece of code and I can't find anything about it.

Thanks  !
Link to comment
Share on other sites

Hi, thanks, the code works, but the post didn't show the < br > and that's what I meant by including HTML code without flipping it, so let's say I'll be able to do
"Hi,
blah blah blah" (by "Hi, < br > blah blah blah")
and not just "Hi, blah blah blah" in one single line

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.