php-db | 2001071
Date: 07/08/01
- Next message: Hugh Bothwell: "Re: [PHP-DB] Re: Homesite Server Mapping"
- Previous message: Kevin: "[PHP-DB] Login Help"
- Next in thread: Ben Bleything: "RE: [PHP-DB] Control Structure Error"
- Reply: Ben Bleything: "RE: [PHP-DB] Control Structure Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here is the code that I am trying to use:
//code start
function search_terms($title) {
$array = explode (" ", $title);
for($i=0,$n=count($array); $i<$n; $i++) {
$returned_string = $returned_string . $array[$i] . " OR ";
}
return $returned_string
}
//code end
I want it to turn the string of words stored in $title into an array
($array), then use the for structure to insert the string " OR " in between
each word, and then finally return the string ($returned_string) for DB
purposes.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Hugh Bothwell: "Re: [PHP-DB] Re: Homesite Server Mapping"
- Previous message: Kevin: "[PHP-DB] Login Help"
- Next in thread: Ben Bleything: "RE: [PHP-DB] Control Structure Error"
- Reply: Ben Bleything: "RE: [PHP-DB] Control Structure Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

