[SOLVED]Processing Comma Seperated ISBNs
Posted: Sat Mar 10, 2007 9:36 am
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:
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
Supposing the string looks something like this:
Code: Select all
$input= '0439136350,1557487308,0879234490'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