Results 1 to 3 of 3

Thread: Mixing a word in another word

  1. #1
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default Mixing a word in another word

    Adrain, can u suggest a solution for the following ?

    Code:
    <?php
    
    $tm = "Nice";
    $ad =  "Well";
    
    ?>
    I want to mix $tm in $ad (Nice in Well) not using concat (Nicewell).
    but some thing as following.

    Nwicelle or some thing any complex string...

    Thanks

    Tom
    You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,965
    Thanks
    16
    Thanked 305 Times in 304 Posts
    Blog Entries
    11

    Default

    You could do;
    Code:
    <?php
    $tm = "Nice";
    $ad =  "Well";
    $mix = str_shuffle($tm.$ad);
    echo $mix;
    ?>
    The results will be different every time though so it depends on what you're trying to achieve.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    letom (05-15-2013)

  4. #3
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default

    Thanks .. @Beverley
    Is there any way to put the string in specific field.. suppose

    $ry = ABCDEFGHIJKLMNOP
    $ty = BNGH

    putting BN after char A(1st char) and GH after(last char) P (shuffling changes insertions different in different time)..
    Last edited by letom; 05-16-2013 at 06:22 AM.
    You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

Similar Threads

  1. word --> pdf question
    By Rosalie in forum Other
    Replies: 2
    Last Post: 11-01-2011, 04:23 AM
  2. Word Scramble
    By [Nicolas] in forum Submit a DHTML or CSS code
    Replies: 0
    Last Post: 09-23-2010, 07:24 PM
  3. Word bug
    By techno_race in forum Computer hardware and software
    Replies: 0
    Last Post: 05-12-2009, 07:57 PM
  4. Replies: 4
    Last Post: 04-29-2009, 08:21 AM
  5. no word-wrapping!?
    By ReMaX in forum CSS
    Replies: 3
    Last Post: 12-09-2007, 08:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •