![]() Topic awaiting preservation: Explode() and foreach() help (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: under your rug, |
![]() Ok i'm trying to explode a variable and check if another variable entry is in the first one. code: $incomming = explode(',', $variable1);
|
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() This would be the one-line solution |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() Ew, who was in charge of naming the function "explode" when it's always named "split" in every other language? |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() Slime, PHP has both explode() and split() functions... The difference is that explode() splits a string by string while split() splits a string by regular expression. |
Paranoid (IV) Inmate From: under your rug, |
![]() *Synthetic wounders when the last time he mentioned how much he loved mr.maX* |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() OK then, that's not quite so bad =) |
Paranoid (IV) Inmate From: Milwaukee |
![]() Also, "explode" is a much more entertaining mental image. |
Paranoid (IV) Inmate From: France |
![]() The explode + in_array combo sounds obvious but I prefer by far mr.maX BTW2 suggestion. |