4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu
Please consider registering: registration is fast, easy and free! Benefits of registration:
  • Free advertising for your website: Every post in our forums goes towards a "credit" of ads, which are displayed on most pages of our forums. Each post gives you 400 ad impressions. To submit your ad, edit your profile.
  • Discount at TemplateMonster: All our members enjoy a 10% discount at TemplateMonster.com!
  • Private Messages: Exchange private messages with other members of the forums.
  • Message Tracking/Subscription: phpBB enables you to subscribe to threads which interest you, and will then email you when a reply is posted. phpBB also remembers which posts registered users have read during a session, which means you can keep track of which posts you have already looked at.

 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 (9 years, 11 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 (9 years, 11 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: 2192
Location: London, UK

PostPosted: Sat May 31, 2003 7:54 am (9 years, 11 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 MessageVisit Poster's Website
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.048202 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme