seperating words

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
Hadleigh
New php-forum User
New php-forum User
Posts: 32
Joined: Tue Feb 04, 2003 10:32 am
Location: UK
Contact:

Tue Mar 18, 2003 10:34 am

I haven't tested this but I hope it helps!

Code: Select all

function sep($string){

   $ip=explode("- -", $string);
   $ip=trim($ip[0]);
   
   $date=explode("]", $ip[1]);
   $date=str_replace("", "[", $date[0]);
   $date=trim($date[0]);
   
   $search_string=explode("&q=", $ip[1]);
   $search_string=explode("\"", $search_string[1]);
   $search_string=trim($search_string[0]);

   $you_have["ip"]=$ip;
   $you_have["date"]=$date;
   $you_have["search_string"]=$search_string;
   
   return $you_have;
}
A learned man is an idler who kills time by study.

George Bernard Shaw (1856-1950)

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests