Results 1 to 5 of 5

Thread: AWS A Brief Introduction Using PHP tutorial

  1. #1
    Resident smart a$$
    Join Date
    Sep 2003
    Location
    UK
    Posts
    152

    AWS A Brief Introduction Using PHP tutorial

    Dan - or anyone who would know

    I've been scratching my hand all afternoon on this one.

    Using your AWS XML-PHP tutorial as a guide how would I go about parsing the Authors and Customer reviews into PHP as their another level down in the XML?

    Example:

    <Authors>
    <Author>Derek Franklin</Author>
    <Author>Jobe Makar</Author>
    </Authors>

    As per your tutorial im trying the following to set the variable(s):

    Code:
    elseif($d_ar[$j]['tag'] == 'Authors'){
            $Authors = $d_ar[$j]['value'];
          }
    thanks for your help!

  2. #2
    Registered GCT13's Avatar
    Join Date
    Aug 2003
    Location
    NYC
    Posts
    480
    Hey Best.Flash, look closer in the tutorial, for items like author or reviews that could have multiple items the variable you set is an array. For authors, look for the <Author> XML tag (not <Authors>).

    PHP Code:
    elseif($d_ar[$j]['tag'] == 'Author'){
      
    $Author[] = $d_ar[$j]['value'];

    PHP Code:
    foreach($Author as $auth){
      echo 
    '<a href="search.php?q=' .$auth'&t=Author">' .$auth'</a> ';

    ....

  3. #3
    Resident smart a$$
    Join Date
    Sep 2003
    Location
    UK
    Posts
    152
    Thanks fella i see all the codes in the product source file as well.

    Charlie

  4. #4
    Junior Registered
    Join Date
    May 2004
    Posts
    3
    I tried to use this code in the browse.php script but I have the authors repeated themselves all the time.

    result 1
    Neil A. Campbell, Jane B. Reece
    result 2
    Neil A. Campbell, Jane B. Reece, Gerard J. Tortora, Berdell R. Funke, Christine L. Case

    and so on.
    It must be something like a break or someting but can't find the way to do it.

  5. #5
    Junior Registered
    Join Date
    May 2004
    Posts
    3
    problem also with the ProductDescription.
    If you use use browse.php in heavy mode and add the following line

    elseif($d_ar[$j]['tag'] == 'ProductDescription') {$ProductDescription = $d_ar[$j]['value'];}

    The ProductDescription appears also in the records where there is no productdescription

Similar Threads

  1. Review: Professional PHP Programming
    By Chris in forum Books
    Replies: 6
    Last Post: 07-17-2013, 05:26 AM
  2. tutorial layout
    By Jaffro in forum Search Engine Optimization
    Replies: 6
    Last Post: 04-21-2004, 03:09 PM
  3. Learning how to create PHP database driven sites online...
    By incka in forum Website Programming & Databases
    Replies: 15
    Last Post: 01-23-2004, 03:18 PM
  4. PHP, ODBC, and Unicode compatibilities...
    By Stevens in forum Website Programming & Databases
    Replies: 4
    Last Post: 10-14-2003, 09:27 AM
  5. PHP Include
    By Mike in forum Website Programming & Databases
    Replies: 4
    Last Post: 05-29-2003, 08:19 AM

Bookmarks

Posting Permissions

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