Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2009
    Posts
    173
    Thanks
    24
    Thanked 1 Time in 1 Post

    PHP preg_match matches help

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA


    WHY ISN'T THIS WORKING!??????? AAAAAAAAAAA

    PHP Code:
    <pre>
    <?php
        $string 
    "Hello Hella Haellowwweennn World";
        
    preg_match("/(\w+)?ell(\w+)?/"$string$matches);
        
    print_r($matches);
    ?>
    </pre>
    I just want it to echo

    Hello
    Hella
    Haellowwweennn

    how hard could that be?

    help pls!
    Last edited by sorlaker; 01-03-2013 at 09:07 PM.

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Posts
    173
    Thanks
    24
    Thanked 1 Time in 1 Post
    Got it. Just had to use preg_match_all.. ty.


  •  

    Posting Permissions

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