1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Simple PHP Script

Discussion in 'Hire a Freelancer' started by sevenfigurez, Feb 7, 2012.

  1. sevenfigurez

    sevenfigurez Junior Member

    Joined:
    Nov 5, 2009
    Messages:
    183
    Likes Received:
    46
    I need a PHP script built to do the following:

    There will be two columns of words. The script will merge all possible variations of keywords made between the two columns of keywords.

    Example:
    CityA Keyword1
    CityB Keyword2
    CityC Keyword3
    CityD Keyword4

    From those two columns, the results will be the following:

    CityA Keyword1
    CityA Keyword2
    CityA Keyword3
    CityA Keyword4
    Keyword1 CityA
    Keyword2 CityA
    Keyword3 CityA
    Keyword4 CityA
    CityB Keyword1
    CityB Keyword2
    CityB Keyword3
    CityB Keyword4
    Keyword1 CityB
    Keyword2 CityB
    Keyword3 CityB
    Keyword4 CityB
    CityC Keyword1
    CityC Keyword2
    CityC Keyword3
    CityC Keyword4
    Keyword1 CityC
    Keyword2 CityC
    Keyword3 CityC
    Keyword4 CityC
    CityD Keyword1
    CityD Keyword2
    CityD Keyword3
    CityD Keyword4
    Keyword1 CityD
    Keyword2 CityD
    Keyword3 CityD
    Keyword4 CityD

    Please PM me with price :)
     
  2. devel

    devel BANNED BANNED

    Joined:
    Feb 3, 2012
    Messages:
    159
    Likes Received:
    0
    PM send you.
     
  3. HeXeR

    HeXeR Junior Member

    Joined:
    Dec 30, 2007
    Messages:
    121
    Likes Received:
    15
    Occupation:
    Self-employed
    Location:
    EU
    Home Page:
    PHP:
    <?php

    $column1 
    = array('CityA''CityB''CityC''CityD');
    $column2 = array('Keyword1''Keyword2''Keyword3''Keyword4');

    foreach(
    $column1 as $city)
    {
        foreach(
    $column2 as $keyword)
        {
            echo 
    $city.' '.$keyword.'<br />';
        }
        
        foreach(
    $column2 as $keyword)
        {
            echo 
    $keyword.' '.$city.'<br />';
        }


    ?>
    Free ;)
     
    • Thanks Thanks x 1