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
    Sep 2010
    Posts
    122
    Thanks
    6
    Thanked 0 Times in 0 Posts

    how to do similar string matching ??

    hi i need to check

    main variable $x="YS728 Black / YS7612 Green ";


    i want to check in variable $x

    $y="YS728-AD black "; or $yy="YS728 black";

    if i need to do is that $y and $yy is some how maching the matching variable $x

    please help me to solve

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,180
    Thanks
    23
    Thanked 602 Times in 601 Posts
    strpos() comes to mind PHP: strpos - Manual returns false if not found or the starting position if it is.

    You can find the string functions with an explanation here PHP: String Functions - Manual
    Note that you can change the language at the top right of the page.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

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