Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Php print

  • 06-04-2006 05:34PM
    #1
    Closed Accounts Posts: 8,866 ✭✭✭


    I'll just throw the whole script up. But basically the script selects customers based on the first letter of their name, so in the previous screen if i type 'A' and hit submit it gives me all the customers whose names start with A. The problem is the print lines are only printing out out the first result repeated a bunch of times. The repeat works, i.e. if there are 6 customers starting with A it will print 6 rows of details, but each row will contain the same details, which are whatever the details are pertaining to the first customer returned from the select statement! Its driving me nuts!

    <removed>


Comments

  • Registered Users, Registered Users 2 Posts: 32,132 ✭✭✭✭is_that_so


    Try using a foreach construct instead and see what's coming out.

    foreach ($array as $key=>$value)

    {
    print $key .":" .$value;
    }

    It'll do the same as counting rows.


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Ah, got it sorted courtesy of nietzchen (apologies for mispelling of name!), thanks anyway!


Advertisement