Hi Shantanu To be honest you'd be far better off doing this manually, rather than using someone elses code - quite important bits and pieces of sql and db access logic which you'll need to learn, but ....
On 03 Apr,2003 at 20:18 Shantanu Oak wrote: <snip> > the following code mentioned on the page, > > $mysearch = new MysqlSearch; > $mysearch->setidentifier("MyPrimaryKey"); > $mysearch->settable("MyTable"); > $results_array = $mysearch->find($mysearchterms); > > I am getting the text array() as a result. </snip> This is php telling you that the variable is of the array type, ie: it is a variable containing many indexed values. BTW, have you changed the setidentifier() and settable() values to the correct ones for your db ? (just checking). <snip> > Can someone explain to me how to use it and get > result. </snip> A handy utility function is var_dump(). This will echo out the contents of any variable type. So to display the contents of your $results_array variable you would do:- <?php echo "<pre>"; var_dump($results_array); echo"</pre>"; ?> That'll show you the contents of the array and what its structure looks like. Displaying it in a controlled form is just a matter of finding out the structure of the array and looping through it using one of php's many many loop constructs / array access functions. Have a read about arrays on www.php.net - they are very useful once you get the hang of them ... ;-) <snip> > > Shantanu Oak > [EMAIL PROTECTED] > http://www.shantanuoak.com Cheers -- Ronan e: [EMAIL PROTECTED] t: 01903 739 997 w: www.thelittledot.com The Little Dot is a partnership of Ronan Chilvers and Giles Webberley -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php