4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Problems with MySQL and arrays
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Milchbazi
Junior WebHelper
Junior WebHelper


Joined: 11 Mar 2003
Posts: 15
Location: NH, USA

PostPosted: Sat May 31, 2003 3:28 am (14 years, 4 months ago) Reply with QuoteBack to Top

Hello everybody!

Is it possible to get arrays out of a mysql database (without unserialize(); )? I mean I have strings in form of

Code:
$table1 = "23.1,45.7,43.8,14.9";
$table2 = "43.6,34.7,66.6,99.1,34.8";


and want to cut them on each comma to put them into an array.
Like that:

Code:
$table1 = array(23.1,45.7,43.8,14.9);


So I can use every number.

Thx for your help!
Milchbazi

PS: It would be the best if I could use it in a function, because I need the same process a lot!

________________________________
TS Designs
___________________________
OfflineView User's ProfileFind all posts by MilchbaziSend Personal MessageVisit Poster's Website
Milchbazi
Junior WebHelper
Junior WebHelper


Joined: 11 Mar 2003
Posts: 15
Location: NH, USA

PostPosted: Sat May 31, 2003 3:37 am (14 years, 4 months ago) Reply with QuoteBack to Top

Helped myself already!

Code:
$table1   = explode(",",$table1);


But do you have an other suggestion? let me know!

See you!
Milchbazi

________________________________
TS Designs
___________________________
OfflineView User's ProfileFind all posts by MilchbaziSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat May 31, 2003 7:54 am (14 years, 4 months ago) Reply with QuoteBack to Top

Hi Milchbazi,

That is the best way to do it that I know of, and it is the way I'm using here at 4WebHelp for tutorial authors who have multiple websites. Smile

Daniel

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.050852 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme