how would you explode this?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

how would you explode this?

Post by elecktricity »

if I had something like this:

Code: Select all

//19//20//37//29//20//35//38//30//33//26//
and I wanted to explode it... the // are just seperators so the numbers wont be confused but are in there cause like if you had 119 and it was changed 19 it might mess it up or something... but yea... I need to get the numbers and subtract from them... so exploding would help
dreamline
Forum Contributor
Posts: 158
Joined: Fri May 28, 2004 2:37 am

Post by dreamline »

I'd do it the easy way:

Code: Select all

$variable='//19//20//37//29//20//35//38//30//33//26//';
$split=explode('//',$variable);
print_r($split);
Post Reply