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
    136
    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. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    6,629
    Thanks
    31
    Thanked 909 Times in 906 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.
    Physics is actually atoms trying to understand themselves.


 

Posting Permissions

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