pulling data out of a field and putting that into an array

Codes here !

Moderators: macek, egami, gesf

stempy
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Feb 14, 2003 10:41 am

pulling data out of a field and putting that into an array

Postby stempy » Fri Feb 14, 2003 10:55 am

:idea:

stempy
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Feb 14, 2003 10:41 am

the question

Postby stempy » Fri Feb 14, 2003 10:56 am

ok i have a field in the table that has multiple words in that field.

i want to be able to pull that field and then make an array of those words.

example

keywords ( job,setup, office, supplies)

that is in the field of keywords in the table.

i want to pull that out of the table that is in one row of data in the table and put that in an array so that i can do a string compare


help

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Sat Feb 15, 2003 5:16 am

$word_array = explode(",", $row['keywords']);

stempy
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Feb 14, 2003 10:41 am

thanks

Postby stempy » Mon Feb 17, 2003 12:26 pm

that seemed to help pootergeist


Return to “mySQL & php coding”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest