Jump to content


Photo

5words out 1 line in 5 variable example


  • Please log in to reply
3 replies to this topic

#1 Jirte

Jirte
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 June 2006 - 05:34 PM

I surching for something i tried it a few times but it can't get anything work.

I give an example to make it easy:

You have a textarea, in this textarea you copie for example:
Jos Bamerman 5 10 5 8
Frank hoskoe 15 6 20 6


the lines will be copied in the texarea
Now i want these 6 words(and numbers) in 6 different variables like
Firstname lastname age housenumber ...
The words are always sepperated with a space.
I was thinking about something that puts everything in a varaible until he sees a comma
So the variable will be like
$firstname = Jos
$lastname = Bamerman ...

Greetz Jirte




#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 12 June 2006 - 06:34 PM

no need for a third party script use [a href=\"http://uk2.php.net/manual/en/function.explode.php\" target=\"_blank\"]explode[/a]. Look at example 1 secound example.

#3 Jirte

Jirte
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 June 2006 - 09:12 PM

ik wist gewoon niet waar het te zetten is helemaal verandert de site dacht ik van ja zet ik het hier even neer bedankt voor je hulp zal het proberen.

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 13 June 2006 - 03:46 PM

Umm.. could you translate that into english?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users