Jump to content

phplemon

New Members
  • Posts

    5
  • Joined

  • Last visited

phplemon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you, in the end it gives me this: Array ( [0] => first [2] => secound ) first = 8 secound = 6 Im going to merge the array with another array so this doesnt really work for me. Maybe I can use this as an array inside another array and still get the result I want. Thx.
  2. Ok, can I make it so that it adds 5 + 3 + an extra 100 to make sure its unique? So the array becomes like this: Array ( [108] => first [106] => second )
  3. Array ( [5] => first [3] => first [2] => second [4] => second ) Hi, I need to merge this array so it becomes this: Array ( [8] => first [6] => second ) So it adds 5 + 3 from the ones with value first. I have tried everything but cant find a solution. How can I do it? thx
  4. Thank you for the answers. Turnes out I only needed to change the google URL(even thou the url I was using worked in browsers but not with PHP curl.) So problem solved. Thanks.
  5. Hi, I'm trying to get some search results from google by using cURL and preg_match. <?php $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, "https://www.google.se/#q=horses"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($curl); curl_close ($curl); if(preg_match_all('#<cite>(.*)</cite>#', $result, $cite)) { foreach($cite[0] as $cite) { echo $cite . '<br />'; } } ?> It doesnt work, I've used this code on other websites to get other things and it works there. What is the problem? Thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.