|
|
|
|
![]() ![]() |
Oct 31 2006, 01:00 PM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 65 Joined: 7-July 05 Member No.: 9,139 |
Here is the code: $username = $check[uname]; $query="SELECT `buildings` FROM `authuser` WHERE `uname` = '$username'"; $result=mysql_query($query); $result=mysql_result($result,0); list($building1,$building2,$building3,$building4,$building5,$building6,$building7,$building8,$building9,$building10,)=explode('|',$result,'|',$position); I want to explode a mysql field into two seperate fields so eg building then position, building then position etc... I want to create a variable for the building then the position eg $building1 then $postion1 then $building2 then $building2 etc... Any ideas? |
|
|
|
Oct 31 2006, 05:18 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,993 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
What does the data for $buildings look like?
Please post a sample for us to review. The explode() needs a unique character or set of characters to use as a delimiter. PHP reference for the function is here: explode () |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th September 2008 - 06:29 AM |