Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

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

Codes here !

Moderators: macek, egami, gesf

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
stempy
New php-forum User
New php-forum User
 
Posts: 4
Joined: Fri Feb 14, 2003 10:41 am

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

$word_array = explode(",", $row['keywords']);
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

thanks

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

that seemed to help pootergeist
stempy
New php-forum User
New php-forum User
 
Posts: 4
Joined: Fri Feb 14, 2003 10:41 am


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.