Jump to content

reversing text...


Mouse

Recommended Posts

I have been using a language filter to add tooltips (informative mousovers) to my site but I had an issue with the filter finding keywords within the added mousover script… erm… a little clearer? Well if I used “Duck” as a keyword and then I put the phrase “Donald Duck” into the mouesover explanation the function died so I tried this…

I reversed all the content with
[code]
<?php
$outputtext = strrev($inputtext);
echo $outputtext
?>
[/code]

So “Donald ‘Fauntleroy’ Duck He usually wears a sailor shirt and cap — but no pants (except when he goes swimming). Although usually easygoing, Donald's most famous trait is his short and often explosive temper. Donald's famous voice, and semi-intelligible is one of the most identifiable voices in the world”

Became

“dlrow eht ni seciov elbaifitnedi tsom eht fo eno si elbigilletni-imes dna ,eciov suomaf sdlanoD .repmet evisolpxe netfo dna trohs sih si tiart suomaf tsom sdlanoD ,gniogysae yllausu hguohtlA .)gnimmiws seog eh nehw tpecxe( stnap on tub — pac dna trihs rolias a sraew yllausu eH kcuD yoreltnuaF dlanoD”

then I used a little CSS to put it right again…

[code]
.backwards {unicode-bidi:bidi-override; direction: rtl;}
[/code]

Well I thought so… but have a look for yourself what happens… http://mouse.nodstrum.com/backwards.php

Any ideas??? Please

Mouse
Link to comment
Share on other sites

[quote author=mjdamato link=topic=112850.msg458319#msg458319 date=1161903613]
I think you need to find another approach. Perhaps serializing the value?
[/quote]
so what were you thinking? i didn't get what you meant...
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.