1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php include help

Discussion in 'PHP' started by farhang, Apr 4, 2008.

  1. #1
    Hello i have a some keywords stored in a array called $search

    What i want is to replace the blahblah with search array.

    <?php include('http://127.0.0.1/search/searchinclude.php?query=BLAHBLAHBLAH&search=1&results=10'); ?>

    i though the following code would work but it is'nt working, do i need to add print with it ? and if yes then how...

    thanks

    searchinclude.php?query='. $search .'&search
    Code (markup):
     
    farhang, Apr 4, 2008 IP
  2. cbn81

    cbn81 Peon

    Messages:
    160
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what's inside search? keyword value pairs or what else?
     
    cbn81, Apr 4, 2008 IP
  3. Ikki

    Ikki Peon

    Messages:
    474
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi mate,

    Try this:

    include('http://127.0.0.1/search/searchinclude.php?query='. urlencode($search) .'&search=1&results=10');
    PHP:
     
    Ikki, Apr 4, 2008 IP
  4. farhang

    farhang Active Member

    Messages:
    383
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    just 2 keywords. if i print, i get "keyword1 keyword2"
     
    farhang, Apr 4, 2008 IP
  5. farhang

    farhang Active Member

    Messages:
    383
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Works perfectly, thanks Ikki
     
    farhang, Apr 4, 2008 IP
  6. Ikki

    Ikki Peon

    Messages:
    474
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Great :) Glad to know that!
     
    Ikki, Apr 5, 2008 IP