Jump to content

razormedia

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

razormedia's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. eval won't work with arrays as I'm also using [] therefore eval($partNames[$jjk] will never work. multidimensional array - possibly I may need to rewrite parts of this to store values rather than whole array references in mda).
  2. initially I would have thought: $$partnames[0] would give me the value of the decoded array but it doesn't seem to work.
  3. apologies salathe, let me try to clarify: $partNames is an array $jjk is just numeric (used in for loop) $decoded is an array so for example, $partnames is an array of strings which I want as references to another array; ie: $partNames[0] = "$decoded[0]["Parts"][3]["BodyPart"]"; its how to use this string as a reference to the particular value held in $decoded[0]["Parts"][3]["BodyPart"] thats the question. make sense or still confusing?
  4. Please don't make me rewrite it. I assume the answer is staring me in the face but I cannot see it.
  5. here you are returning the whole content, to reference specific parts of a site there are numerous ways: 1) RSS, XML, API feeds - this will provide you with interfaces to quickly retrieve specific options (not always available) 2) scraping and parsing - this is taking parts (or whole site and disregarding parts you are not familiar with). Frowned upon without siteowners permission (espoecially if you are to do this frequently). Its possible to do what you are doing and then 'filter' the returned content to disregard anything BUT the images / itmes you want. Great chapter on this in http://www.amazon.co.uk/Webbots-Spiders-Screen-Scrapers-Developing/dp/1593273975/ref=sr_1_6?ie=UTF8&qid=1318193937&sr=8-6
  6. change the section from this: <tr> <td>".$row['product_id']."</td> <td>".$row['product_title']."</td> <td>".$row['product_Description']."</td> <td>".$row['product_price']."</td> </tr> to this <tr> <td>".$product_id."</td> <td>".$product_title."</td> <td>".$product_Description."</td> <td>".$product_price."</td> </tr>
  7. I haven't posted here before but I am completely stuck. I've checked everywhere and cannot find answer to this question. I have an array and if I were to do this: echo $partNames[$jjk]; it would return another part of an array as such: $decoded[0]["Parts"][3]["BodyPart"] (if I retrieve type, this is a string). Now, I need to return the actual value from particular array reference and I cannot for the life of me do it and its destroying my will to live. i've tried combinations of: echo $partNames[$jjk]; echo $$partNames[$jjk]; echo ${$partNames[$jjk]}; echo ${$partNames}[$jjk]; $sssttt = substr($partNames[$jjk], 1); echo $sssttt.' - '.${$sssttt}; Yet nothing seems to work. Solution is to rewrite whole script but this is now pretty complicated parser and I do not want to rewrite sections as deadlines are looming. Any help would be appreciated. (I'm new but i'll try to help others now in anticipation of help). Cheers
×
×
  • 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.