[SOLVED]Processing Comma Seperated ISBNs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tomcat7194
Forum Commoner
Posts: 48
Joined: Mon Jul 31, 2006 1:34 pm

[SOLVED]Processing Comma Seperated ISBNs

Post by Tomcat7194 »

Hello. I am trying to write php to look up multiple ISBNS using the Amazon.com Web Service API. What I want to be able to do is enter ISBNS seperated by commas into one big text box, then feed that into a PHP script that seperates the ISBNS and looks each up.

Supposing the string looks something like this:

Code: Select all

$input= '0439136350,1557487308,0879234490'
I need to first determine how many ISBNS there are (so that I can loop the right number of times), then feed each ISBN into the Amazon.com code within a loop so that I can display information for each.

What would be the best way to determine the number of ISBNS? Once I have that, what's the best way to seperate them out? Regular expressions? Some variant of getcsv()? Something entirely different?

Thanks
Tom
Last edited by Tomcat7194 on Sat Mar 10, 2007 11:46 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Tomcat7194
Forum Commoner
Posts: 48
Joined: Mon Jul 31, 2006 1:34 pm

Post by Tomcat7194 »

Thanks
Post Reply