Help-Php replace characters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help-Php replace characters

    Pls help me with this:
    i want to make a php script.suppose In a text input box someone writes "a b c" and submits it i need it to be converted via php to "x y z" and displayed. I will define what characters to change. Like i will define that "a" needs to be replaced with "x" and so on. I have already done this in javascript but it only works in pc. I want to make it for mobile thats why it needs to be in php. Please help me someone and maybe provide me an fully functional example script which does this. Thanks in advance.:-)

    #2
    PHP Code:
    str_replace('a b c''x y z'$var 
    libra.wen.ru

    Comment


      #3
      You Nutters can try

      $text = preg_replace(' a b c ' , ' x y z ' , $text);

      $text = str_replace(' a b c ' , ' x y z ' , $text);

      PHP: str_replace - Manual
      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
      Visit: WapMasterz Coming Back Soon!
      _______
      SCRIPTS FOR SALE BY SUBZERO
      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
      _______
      Info & Tips
      php.net
      w3schools.com

      Comment


        #4
        Confuzed

        i don't understand, please explain in an easy manner cause i'm an newbie in php

        Someone enters "a b c"(just an example) in an html form and when he submits my php script converts it to "x y z"(another example).
        Please help me and post example with the html form

        Comment


          #5
          First u should know how to retrive data from form to variable via _POST, and than use posted examples to replace what u want.
          Try reading this: php for the absolute beginner
          <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

          Comment


            #6
            u must start learning php to understand what they are posting..php needs understanding.you sould not just copy and paste it..just a friendly advice..

            Comment

            Working...
            X